Repository navigation
feat: support CompoundCurve in WKT and EWKT decoding - #45
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #45 +/- ##
============================================
+ Coverage 99.39% 99.43% +0.04%
- Complexity 234 252 +18
============================================
Files 29 31 +2
Lines 492 534 +42
============================================
+ Hits 489 531 +42
Misses 3 3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Independent review — READY FOR MERGEReviewed revision: I independently reviewed Story #43, its acceptance criteria and API approval comment, the implementation and tests, and the applicable LongitudeOne governance, architecture, standards and serialization guidance. I am the Reviewer agent, not the Developer agent that authored this implementation. This assessment is posted as a comment because the authenticated GitHub account also owns the PR. Both findings from the initial local review are resolved:
Acceptance criteria and applicable pre-merge Definition of Done were considered: recognition in the shared parser, CompoundCurveInterface results, EMPTY, linear/circular/mixed components, exact coordinate and component preservation, open/closed curves, XY/XYZ/XYM/XYZM, dimension consistency, EWKT SRID propagation, WKT SRID rejection, malformed/disconnected input, exception wrapping, regression coverage and user documentation are satisfied. Structural invariants remain delegated to spatial-types. The approved API scope is respected; no additional architecture, breaking or unresolved normative gate was identified. Independent validation on this revision:
No blocking findings or unresolved gates remain. No code was changed during this review. This verdict does not merge the PR or declare Story #43 Done: Alexandre's merge decision and the post-merge Definition of Done verification remain outstanding. |
Independent review update — READY FOR MERGEReviewed revision: The incremental diff adds only Independent validation of the committed revision:
The previous review conclusions remain applicable. No blocking finding or unresolved gate was introduced, and the requested uncovered paths are now tested. This verdict applies specifically to the SHA above; later uncommitted or committed edits are outside this assessment. No code was modified by the Reviewer and no merge was performed. Story completion still requires merge and post-merge Definition of Done verification. |
1da96d1 to
b962db6
Compare
Pull Request
Closes #43
Summary
Decode COMPOUNDCURVE in WKT and EWKT into dimension-specific CompoundCurveInterface objects. Preserve ordered linear/circular components, coordinates, EMPTY values and EWKT SRID; delegate continuity and structural invariants to spatial-types.
Linear components use parenthesized coordinates, while circular components retain their CIRCULARSTRING keyword. Typed LINESTRING components are rejected in both dialects, with regression coverage. README examples and supported-type information are updated.
Acceptance criteria
Tests cover mixed and single-family components, open/closed curves, all four dimensions, EMPTY, collection nesting, SRID propagation/rejection, disconnected components, malformed syntax, and exception wrapping.
Validation
Commands run
Full suite: 438 tests, 2465 assertions on PHP 8.5.11 and PHP 8.4.26. Quality: CS Fixer, PHPStan level 9, PHPMD production/tests and PHPCS pass. Installed PDepend tooling emits deprecations under PHP 8.5 without failing checks. GitHub Actions remain to be verified after publication.
Standards
Normative references
ISO/IEC CD 13249-3:201x(E), available Committee Draft dated 2009-01-16, clause 5.1.57, printed page 145:
<compoundcurve text>and<single curve text>. Linear components use<linestring text body>and circular components use<circularstring text representation>. EWKT retains the existing extension rules.Architecture
Architecture decision
Shared textual parser and dimension-specific factory follow existing decoder conventions. Domain continuity validation remains in spatial-types.
Compatibility
API approval: #43 (comment)
Documentation
Developer handoff
Important implementation decisions
Components remain separate domain curves. Unsupported component tokens and inconsistent dimensions fail through the existing decoder exception contract. Domain failures preserve their original cause.
Compatibility considerations
Previously supported geometries retain existing behavior. WKT still rejects SRID prefixes and requires non-XY dimension markers. The new COMPOUNDCURVE support replaces its previous NotYetImplementedException.
Remaining risks or questions
Independent review and required GitHub Actions remain pending. No unresolved governance gate; no merge requested.