Skip to content

WKT2: Complete parsing/model/serialization implemented#136

Open
mario-mu wants to merge 5 commits intoNetTopologySuite:developfrom
TKI-Chemnitz:feature/wkt2_support
Open

WKT2: Complete parsing/model/serialization implemented#136
mario-mu wants to merge 5 commits intoNetTopologySuite:developfrom
TKI-Chemnitz:feature/wkt2_support

Conversation

@mario-mu
Copy link
Copy Markdown
Contributor

New object-oriented WKT2 CRS model introduced (including for GEOGCRS, PROJCRS, VERTCRS, COMPOUNDCRS, BOUNDCRS, ENGCRS, PARAMETRICCRS) with all components. The WKT2 reader has been fundamentally implemented and now supports parsing into the new model as well as conversion to/from ProjNet objects. A new writer enables serialization back to WKT2. Extensive unit tests for parsing, roundtrip, and model structure added. This enables complete, roundtrip-capable WKT2 parsing and serialization in ProjNet for the first time.

References #83 and #86

New object-oriented WKT2 CRS model introduced (including for GEOGCRS, PROJCRS, VERTCRS, COMPOUNDCRS, BOUNDCRS, ENGCRS, PARAMETRICCRS) with all components. The WKT2 reader has been fundamentally implemented and now supports parsing into the new model as well as conversion to/from ProjNet objects. A new writer enables serialization back to WKT2. Extensive unit tests for parsing, roundtrip, and model structure added. This enables complete, roundtrip-capable WKT2 parsing and serialization in ProjNet for the first time.

References NetTopologySuite#83 and NetTopologySuite#86
@mario-mu mario-mu force-pushed the feature/wkt2_support branch from ac162b5 to 551dfd3 Compare January 21, 2026 16:09
mario-mu and others added 4 commits March 27, 2026 20:28
- Add null checks in FromProjNetProjectedCoordinateSystem and
  FromProjNetGeographicCoordinateSystem to catch invalid inputs early
- Add ENGCRS, ENGINEERINGCRS and PARAMETRICCRS support to WKT2 parser
- Refactor ReadAbridgedTransformation and ReadConversion: collect
  parameters, IDs and remarks first, assign to object after full parse
- Add explicit check for method name in transformations and conversions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Create Wkt2BBox class for bounding box data (south/west/north/east)
- Create Wkt2Usage class for USAGE elements (scope/area/bbox)
- Add Usages property to Wkt2CrsBase
- Update reader to parse USAGE, SCOPE, AREA, BBOX in all CRS types
- Update writer to serialize usage metadata before ID/REMARK

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Wkt2TemporalDatum: temporal datum model (TDATUM/TIMEDATUM)
  with Calendar, TimeOrigin, Id, and Remark support
- Wkt2TimeCrs: temporal CRS model (TIMECRS) with datum and CS
- Wkt2DerivedGeogCrs: derived geographic CRS model (DERIVEDGEOGCRS)
  with base GEOGCRS, deriving conversion, and CS
- Reader: ParseCrs dispatch, ReadTemporalDatum, ReadTimeCrs,
  ReadDerivedGeogCrs, plus BoundCrs/CompoundCrs child support
- Writer: WriteTemporalDatum, WriteTimeCrs, WriteDerivedGeogCrs
- WktReader: TIMECRS/DERIVEDGEOGCRS keyword dispatch

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Parser and writer support CONCATENATEDOPERATION including model classes
- Projection method mapping extended to 30 WKT2-to-ProjNet and
  25 ProjNet-to-WKT2 entries with round-trip capability
- Datum models extended with Anchor and FrameEpoch properties
- Parser recognizes alternative keywords and bracket styles
- Comprehensive new tests: concatenated operations, DerivedGeogCRS,
  TimeCRS, projection mapping, usage/remark metadata, error handling,
  writer round-trips, transform accuracy, and parser edge cases

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant