Skip to content

Epic: Decode PostGIS Extended Well-Known Text #31

Open
6 of 6 issues completed
Open

Description

@Alexandre-T

Epic: Decode PostGIS Extended Well-Known Text

Context

The decoder currently supports Well-Known Text (WKT) representations based on
the spatial standards supported by the project.

PostGIS defines Extended Well-Known Text (EWKT) as an extension of WKT. EWKT
can carry spatial reference information through an SRID prefix and supports
PostGIS-specific representations of spatial dimensions.

Unlike WKT, EWKT is not an OGC or ISO standard. PostGIS therefore defines the
reference behavior for EWKT syntax, while the underlying geometry model and
standard WKT representations remain governed by the applicable OGC and ISO
specifications.

The decoder should support EWKT without unnecessarily restricting input to
the canonical representation emitted by PostGIS. Equivalent, unambiguous WKT
and EWKT representations may be accepted when they can be decoded into the
same spatial model.

Objective

Allow users to decode PostGIS Extended Well-Known Text into the corresponding
SpatialInterface, including spatial reference and dimensional information,
while preserving the semantics of the represented geometry.

The decoder should interoperate with EWKT produced by PostGIS and accept
compatible, unambiguous representations when they can be represented by the
project's spatial model.

Scope

This Epic covers decoding textual geometry representations using the PostGIS
EWKT dialect.

It includes:

  • PostGIS EWKT representations for geometry types supported by the project;
  • optional EWKT SRID information;
  • XY, XYZ, XYM, and XYZM geometries;
  • PostGIS dimensional syntax and equivalent supported WKT dimensional syntax;
  • empty geometries supported by the spatial model;
  • validation of EWKT input before producing a SpatialInterface;
  • preservation of geometry type, coordinates, dimensions, and spatial
    reference information represented by the input.

PostGIS EWKT syntax and behavior are defined from the official PostGIS
documentation and the corresponding liblwgeom lexer and parser behavior.

OGC Simple Feature Access and ISO/IEC 13249-3 remain the references for
standard WKT and spatial geometry semantics where applicable.

The decoder may accept unambiguous representations beyond the canonical EWKT
emitted by ST_AsEWKT() when they can be mapped without loss or ambiguity to
the supported spatial model.

Geometry types or spatial constructs that cannot be represented by the
project's SpatialInterface model are outside the scope of this Epic.

Encoding EWKT and reproducing the canonical output of PostGIS
ST_AsEWKT() are outside the scope of this Epic.

Stories

  • Support EWKT spatial reference information
  • Decode EWKT dimensional representations
  • Validate EWKT decoding compatibility and edge cases

The list may evolve during refinement as the Epic is better understood or
additional work is identified.

Completion Criteria

The Epic is complete when:

  • All Stories required to achieve the objective are completed.
  • The expected outcome described by the Epic is achieved.
  • No unresolved work required by the defined scope remains.

Project-wide quality requirements and the Definition of Done apply
independently and should not be duplicated in this Epic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    spatial:wktRelated to Well-Known Text or Extended Well-Known Textstandard:complianceImproves or restores standards compliancestandard:isoRelated to ISO spatial standardsstandard:ogcRelated to OGC specifications

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions