Repository navigation
feat: decode EWKT dimensional representations - #39
Merged
Merged
Conversation
13 tasks done
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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), andPOINT 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
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
Commands run
Quality tools emit dependency deprecation notices from PHPMD/PDepend but complete successfully. GitHub CI results remain to be checked after publication.
Standards
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
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
Documentation
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.