Repository navigation
Add SQL/MM CircularString (GeoTools-style, locationtech master) - #1232
Open
grootstebozewolf wants to merge 1 commit into
Open
grootstebozewolf wants to merge 1 commit into
grootstebozewolf wants to merge 1 commit into
Conversation
cursor
Bot
force-pushed
the
locationtech-master
branch
from
September 16, 2026 06:33
82b0725 to
1d2fea9
Compare
CircularString is a real JTS geometry based on locationtech/jts master. It stores chained 3-point control windows and composes ExactCircularArc for each window. Collinear windows degrade to a chord. length() and envelope stay exact; densify only via toLinear / getLinearized / linearize. WKTReader/WKTWriter support CIRCULARSTRING using control points. SegmentString is unchanged. No CompoundCurve, OverlayNG, or Year-2 Exact* types. Assisted-by: Cursor Agent Assisted-by: xAI Grok
grootstebozewolf
force-pushed
the
locationtech-master
branch
from
September 16, 2026 07:13
1d2fea9 to
7ce2613
Compare
This branch has not been deployed
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.
Summary
Adds a first-class SQL/MM
CircularStringto JTS, following the approach Jody outlined on jts-dev in 2019: subclassLineString, keep the 3-control-point windows, linearize on demand. Not “flatten to LineString at parse time”.This is a small, isolated land on current
locationtech/jtsmaster (9c995e53). It does not touch OverlayNG, noding, orSegmentString.2019 thread:
Behaviour
(start, mid, end); end of window N is start of N+1.CIRCULARSTRING(s, m, s)is the circle with diameters–m.getLength()/ envelope use the composed arcs (radius * sweep, or chord length).toLinear(tolerance)(linearize/getLinearizedare aliases).SegmentStringstays linear.Each window is an
ExactCircularArcbehind a thinExactCurvewith six methods only:getStart(),getEnd(),length(),pointAt(t),toLinear(tolerance),isExact(). No other curve kinds.Out of scope (on purpose)
CompoundCurve, CurvePolygon, WKB, OverlayNG, ArcNoder / non-linear
SegmentString.Tests
Includes WKT round-trip, closed ring, collinear degrade, tolerance growth, and a pinned quarter-circle
CIRCULARSTRING (5 0, 3 4, 0 5)with length5 * π/2.mvn -pl modules/core checkstyle:checkis clean. New files: author Jeroen Bloemscheer; AI assistance disclosed in a second comment after the EPL/EDL header.Ask
Is this the right grain for upstream (type + WKT only), or would you rather see WKB in the same PR?