Repository navigation
feat(geojson): preserve geometry collection structure - #24
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #24 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 178 182 +4
===========================================
Files 15 15
Lines 328 336 +8
===========================================
+ Hits 328 336 +8 ☔ 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.
Closes #15.
GeoJSON now encodes GeometryCollection and GeographyCollection recursively, preserving member types, order, nesting, singleton/homogeneous forms, EMPTY objects and Z. All six existing geometry encoders are reused; unsupported types and incompatible structures propagate their existing exceptions without partial output.
The existing dimension check rejects measured collections, including EMPTY. The real model enforces matching member dimensions, families and references. Reference metadata remains omitted and coordinates unchanged; JSON failures retain their original exception. No public signature, dependency or existing strategy behavior changes; no breaking change or unresolved gate.
English documentation explains the approved preservation policy despite RFC 7946 §3.1.8 SHOULD guidance, its interoperability trade-off and caller responsibilities, including unchanged antimeridian crossings (§3.1.9).
Validation:
composer test: 980 tests, 1636 assertions passed.composer quality: passed; existing PHPMD/PDepend dependency deprecation notices remain.git diff --check: passed.Independent review has not been launched, as explicitly requested by the Product Owner. The Story is not Done and this PR is not merged.