Skip to content

feat: decode EWKT dimensional representations - #39

Merged
Alexandre-T merged 1 commit into
mainfrom
33-decode-ewkt-dimensional-representations
Oct 2, 2026
Merged

Alexandre-T merged 1 commit into
mainfrom
33-decode-ewkt-dimensional-representations

Conversation

@Alexandre-T

Copy link
Copy Markdown
Contributor

Pull Request

Closes #33

Summary

EWKT now accepts compact dimensional markers and infers unmarked tuples with two, three, or four ordinates as XY, XYZ, or XYZM. For example, POINT (1 2 3), POINTZ (1 2 3), and POINT Z (1 2 3) produce the same XYZ point. XYM requires an explicit M marker, including one inherited from a collection. Standard WKT behavior is preserved.

Acceptance criteria

  • All acceptance criteria are implemented.

Tests cover XY/XYZ/XYM/XYZM, separated and compact markers, implicit dimensions, all currently supported geometry families, collections, EMPTY, conflicting dimensions, SRID 4326 and default SRID 0, and WKT non-regression.

Validation

  • Relevant tests pass: 266 tests, 725 assertions on PHP 8.4.25.
  • Repository quality checks pass.
  • Regression tests were added.

Commands run

composer test
composer quality
git diff --check

Quality tools emit dependency deprecation notices from PHPMD/PDepend but complete successfully. GitHub CI results remain to be checked after publication.

Standards

  • No normative spatial behavior is affected.
  • Applicable normative requirements were verified.
  • A Normative Gate was required and resolved.

Normative references

This change implements the EWKT extension contract approved in story #33, rather than changing standard WKT rules. Extension references inspected: PostGIS ST_GeomFromEWKT and PostGIS text parser.

Architecture

  • No architectural boundary is affected.
  • The change follows an already approved architectural decision.
  • An Architecture Gate was required and resolved.

Architecture decision

An internal WKT/EWKT dialect selects dimension inference and compact-suffix validation in the existing shared parser. Geometry construction and spatial model responsibilities remain unchanged.

Compatibility

  • No supported public API is affected.
  • Public API changes were explicitly approved.
  • No breaking change is introduced.
  • Breaking changes were explicitly approved.

Documentation

  • Documentation was updated where required.
  • No documentation change is required.

The README documents accepted EWKT dimensional syntax and its distinction from WKT.

Developer handoff

Important implementation decisions

Dimension inference applies only when no explicit or inherited dimension is available. Existing tuple validation rejects mismatches; XYM is never inferred from an unmarked three-ordinate tuple. Unmarked EMPTY retains existing XY defaults unless it inherits a collection dimension.

Compatibility considerations

WKT continues to reject compact suffixes and non-XY coordinates without dimension markers. SRID handling, dependencies, and supported geometry types are unchanged.

Remaining risks or questions

Independent review and required CI remain pending. No unresolved governance gate. This PR does not declare the story Done.

@Alexandre-T Alexandre-T linked an issue Oct 2, 2026 that may be closed by this pull request
13 tasks done
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.09%. Comparing base (6a5bfe4) to head (7938a52).

Additional details and impacted files
@@             Coverage Diff              @@
##               main      #39      +/-   ##
============================================
+ Coverage     99.08%   99.09%   +0.01%     
- Complexity      201      206       +5     
============================================
  Files            24       24              
  Lines           435      441       +6     
============================================
+ Hits            431      437       +6     
  Misses            4        4              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Alexandre-T
Alexandre-T merged commit 0071b4f into main Oct 2, 2026
3 checks passed
@Alexandre-T
Alexandre-T deleted the 33-decode-ewkt-dimensional-representations branch October 2, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Story: Decode EWKT dimensional representations

2 participants