Skip to content

feat: complete EWKT geometry coverage - #40

Merged
Alexandre-T merged 1 commit into
mainfrom
35-complete-ewkt-geometry-coverage-and-compatibility-validation
Oct 2, 2026
Merged

Alexandre-T merged 1 commit into
mainfrom
35-complete-ewkt-geometry-coverage-and-compatibility-validation

Conversation

@Alexandre-T

Copy link
Copy Markdown
Contributor

Pull Request

Closes #35

Summary

EWKT now decodes TRIANGLE and POLYHEDRALSURFACE alongside the seven existing geometry families. Triangles preserve XY, XYZ, XYM and XYZM; polyhedral surfaces support XYZ and XYZM. Invalid surface structures and unsupported layouts raise the decoder's InvalidArgumentException.

The parsers reuse the existing polygonal grammar and spatial-model validation, preserving coordinates, nested structures and root SRID. Standard WKT behavior remains unchanged.

Acceptance criteria

  • All acceptance criteria are implemented.

Coverage follows the explicit inventory approved in the issue comments: nine supported geometry types, six recognized unimplemented types, and four non-instantiable types. Tests cover EMPTY values, nested collections, dimensional consistency, recursive SRID propagation and exception distinctions.

Validation

  • Relevant tests pass.
  • Repository quality checks pass.
  • Regression tests were added when fixing a bug.

Commands run

composer test
composer quality
git diff --check

331 tests and 1087 assertions passed. Line coverage: 99.02%. Quality checks passed; PHPMD/PDepend emit existing dependency deprecation notices. Added 65 coverage cases and updated a prior rejection fixture now that valid EWKT triangles are supported.

Standards

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

Normative references

No new normative interpretation. This implements the approved EWKT extension scope in issue #35 and its comments, reusing existing polygonal grammar and spatial-types constraints.

Architecture

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

Architecture decision

Two internal EWKT surface parsers adapt the existing polygon and multi-polygon parsers. They are registered only for the EWKT dialect.

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 supported EWKT types, surface dimensional restrictions and decoder validation errors.

Developer handoff

Important implementation decisions

Surface constructors apply the existing spatial-model constraints; model exceptions are translated into decoder InvalidArgumentException. Unsupported polyhedral layouts are validation failures, not unimplemented types.

Compatibility considerations

The existing lexical classification of unimplemented and non-instantiable types is preserved, including its precedence over body validation. WKT retains its existing supported geometry set.

Remaining risks or questions

No unresolved governance gates or implementation questions. Independent review and CI remain pending.

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

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.13%. Comparing base (0071b4f) to head (2647de2).

Additional details and impacted files
@@             Coverage Diff              @@
##               main      #40      +/-   ##
============================================
+ Coverage     99.09%   99.13%   +0.04%     
- Complexity      206      220      +14     
============================================
  Files            24       26       +2     
  Lines           441      465      +24     
============================================
+ Hits            437      461      +24     
  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 e58bdf9 into main Oct 2, 2026
3 checks passed
@Alexandre-T
Alexandre-T deleted the 35-complete-ewkt-geometry-coverage-and-compatibility-validation branch October 2, 2026 20:10
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: Complete EWKT geometry coverage and compatibility validation

2 participants