feat: GEOS-flavour ISO/EXTENDED curve WKB and spaced WKT I/O - #51
Merged
grootstebozewolf merged 2 commits intoAug 16, 2026
Merged
Conversation
Add WKBWriter.setFlavor(ISO|EXTENDED) matching GEOS (default Extended). ISO writes type+1000/2000/3000 and omits SRID; Extended keeps EWKB bits. Core WKBWriter refuses to flatten SQL/MM types 8-12. Curve WKT emits a spaced Z/M/ZM suffix. Cite ISO/IEC 13249-3. Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>
This draft stays curve types 8-12 plus ISO/EXTENDED Z/M/ZM. Triangle, PolyhedralSurface, and TIN are not added. Unknown type throws. Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>
grootstebozewolf
marked this pull request as ready for review
August 16, 2026 18:20
cursor Bot
pushed a commit
that referenced
this pull request
Aug 16, 2026
MMF is WKB/WKT clean roundtrip. Drop overlay, hull, densify, and Option C. Keep write honesty: WKT CompoundCurve members, toText, GML/KML/GeoJSON refuse, TestBuilder clipboard/toWKT. Core WKB 8-12 refuse stays on #7 after #51. Cite ISO/IEC 13249-3. Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>
cursor Bot
pushed a commit
that referenced
this pull request
Aug 16, 2026
I/O identity, not op honesty. Types 8-12 + ISO 1008-3012. Flavour stays on #51. Cite ISO/IEC 13249-3. Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>
cursor Bot
pushed a commit
that referenced
this pull request
Aug 16, 2026
Rebased on feature/sfa-curve-rgr @ fa640cf. #51 owns WKB 8-12 and ISO/EXTENDED Z/M/ZM. This draft keeps only write honesty #51 does not own: WKT CompoundCurve members, toText, GML/KML/ GeoJSON refuse, TestBuilder toWKT/toGML/clipboard/saveWKT. Cite ISO/IEC 13249-3. Do not merge. Co-authored-by: Jeroen Bloemscheer <grootstebozewolf@users.noreply.github.com>
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.
Draft off #7 (
feature/sfa-curve-rgr). Do not merge unless asked. Does not reopen the 2-D 8–12 reader PR. Does not join ConcaveHull. Does not touch Bar 2 / #38 / #27 / #47. No public noder. No invented DOI.Tip:
3d785d29b765d04e7d63a785835d7aee1fd5cee4Scope
Curve types 8–12 plus ISO/EXTENDED Z/M/ZM only. WKB 15–17 (Triangle / PolyhedralSurface / TIN) are not added — GEO-TIN waits Architect SIGN. Unknown type throws.
Contract
GEOS-as-reference (libgeos/geos main @
737737db), ISO/IEC 13249-3 SQL/MM Spatial. NowkbCurve/wkbSurface.Flavour API (matches GEOS
WKBWriter::setFlavor):WKBConstants.wkbExtended = 1(default)WKBConstants.wkbIso = 2WKBWriter.setFlavor(int)/getFlavor()WKBReader.detectFlavor(int typeInt)on read ((typeInt & 0xffff) / 1000→ 1=Z, 2=M, 3=ZM; plus SFSQL0x80000000Z /0x40000000M /0x20000000SRID)ISO write:
type+1000Z,+2000M,+3000ZM. No SRID. Extended: types 8–12 plus EWKB bits and optional SRID.WKT: spaced suffix
CIRCULARSTRING Z(not glued). Reader acceptsTYPEZandTYPE Z. CompoundCurve / MultiCurve / CurvePolygon rings: LineString is bare(x y, …); CircularString stays tagged. CurvePolygon WKB rings are full child WKB (type header).Writer honesty
Needed a fix on this draft. Core
WKBWriterstill flattened 8–12 viainstanceof LineString/Polygonon starting refb2861a08. This draft throwsIllegalArgumentException(useCurveWKBWriter) instead of emittingwkbLineString=2. LinearRing→LineString remains the only collapse.Tests
GeosCurveIOFlavourTestpins GEOS-compatible type words and WKT strings for the five curve types in 2-D, Z, M, ZM. Byte-level ISO CircularStringZ=1008 pin. Core writer must not emit type 2 for a CircularString. Types 15 / 16 / 17 stayUnknown WKB type.