Repository navigation
feat(geojson): encode MultiLineString geometries - #21
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #21 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 156 161 +5
===========================================
Files 14 14
Lines 287 296 +9
===========================================
+ Hits 287 296 +9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
READY FOR MERGE — PR #21, commit 64acd24. No blocking findings or unresolved Gates.
The applicable Definition of Done requirements prior to merge are satisfied. No GitHub review has been published and no merge has been performed. The merge decision and final post-merge verification are still required; the Story is not declared Done. |
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 #12.
GeoJsonStrategy now encodes Geometry and Geography MultiLineStrings in XY and XYZ, preserving every line, position, member order and Z value. An aggregate with no members emits an empty coordinates array; any EMPTY or singleton LineString member throws UnsupportedGeometryStructureException before JSON is returned.
The implementation adds one private encoder using the existing model coordinate arrays and shared dimension, interface and JSON exception contracts. SRID/reference metadata remains omitted, measured dimensions remain rejected including EMPTY, and antimeridian crossings are preserved unchanged. No new public symbols, dependencies, architecture changes or breaking changes are introduced; the approved Story contracts apply.
RFC 7946 sections 3.1.4–3.1.5 define line and MultiLineString coordinate structure. The approved EMPTY policy and deliberate non-application of antimeridian cutting in section 3.1.9 are documented in docs/strategies.md, with usage and caller responsibilities. Other geometry contributions remain out of scope.
Validation:
GeometryMultiLineStringTest and GeographyMultiLineStringTest cover concrete XY/XYZ examples, empty aggregates, EMPTY first/last/all members, singleton members, measured inputs, order, reference metadata and antimeridian crossings. ExceptionContractTest covers JSON failure chaining using a model-supported non-finite coordinate and preserves the internal interface exception contract.
Independent review and CI remain required before the Product Owner's merge decision. No unresolved implementation gate was identified.