Elliptical Curve, NURBS, Clothoid, Spiral Curve

Jeroen Bloemscheer jeroen.bloemscheer at merkator.com
Sat Oct 31 22:25:49 PDT 2026


You say that “the usual answer is to linearise them before GEOS sees them” but you’re not saying what software wants to use GEOS to work with these types, or what operations it wants to perform that currently require linearization.

A GEOS in-memory type only matters if something actually wants to run GEOS operations on it. The case I know is ERTMS/ETCS Level 2 alignment work.

Infrastructure managers publish track geometry as line–clothoid–arc–clothoid–line sequences (IFC 4.3, LandXML, national open datasets). The operations that currently force densification are:

  *   directed Hausdorff and clearance checks when placing stop marker boards,
  *   distance and intersection tests against surrounding objects (platforms, bridges, other tracks, the boards themselves),
  *   buffering and “point on alignment” predicates used in design and validation.

These are ordinary GEOS/PostGIS/Shapely operations. Today the clothoids are linearized at a worst-case tolerance before the data reaches those libraries, because none of them accept a clothoid natively.

I am not claiming a large existing GEOS-native railway codebase that is blocked today. The implementation I work with is on NTS. The reason to care about GEOS is that a substantial amount of the surrounding analysis and open-data tooling is already written against Shapely or PostGIS; once densified, those tools cannot recover the original accuracy or avoid the payload cost. Getting the curve type solid in JTS/NTS first, then in GEOS, would let that tooling stop densifying.

Happy to leave #1566–#1572 as drafts and treat NTS as the proving ground.

Disclosure: I draft with LLM assistance (Claude) and review and own what I post.




________________________________
From: Jeroen Bloemscheer <jeroen.bloemscheer at merkator.com>
Sent: Friday, 30 October 2026 20:23:57
To: Daniel Baston <dbaston at gmail.com>
Cc: geos-devel at lists.osgeo.org <geos-devel at lists.osgeo.org>
Subject: Re: Elliptical Curve, NURBS, Clothoid, Spiral Curve

Hi Dan,

That's the distinction I should have made more clearly. I'm not arguing that GEOS should become a general-purpose computational-geometry or CAD kernel. If the requirement is arbitrary spline construction, surface modelling, exact constructions, meshing, or a broad catalogue of parametric curves, that belongs in something like CGAL, not GEOS.

What I am proposing is a much narrower set: the curve primitives that are useful as geometry values in the SQL/MM / GIS geometry model, together with the operations needed to move them safely through the GEOS ecosystem. GEOS has already crossed that boundary with CircularString, CompoundCurve, CurvePolygon, MultiCurve and MultiSurface. The question is therefore where to complete that curve model, not whether GEOS should acquire a second computational-geometry framework.

For me, a GEOS-specific scope would be:


  *
CircularString / circular arcs — already present.
  *
CompoundCurve and CurvePolygon — already present and provide the composition model.
  *
EllipticalCurve — a bounded planar curve primitive that cannot in general be preserved by the existing circular representation.
  *
Clothoid — the transition primitive used directly in road and rail alignment, with a natural planar geometry representation and deterministic linearisation.
  *
SpiralCurve — where required by the SQL/MM curve model, following the same representation/I/O contract.
  *
NURBS only as the SQL/MM curve value needed for interchange, not as an invitation to add a CAD modelling system: no surfaces, solids, trimming framework, constraint solver, or general CAGD toolset.
  *

  *
And initially the common operation contract can remain deliberately small: WKT/WKB round-trip, dimensionality/emptiness, length, envelope, point evaluation where appropriate, and tolerance-controlled linearisation. CompoundCurve can then carry these sections without losing their type. Operations such as predicates, distance, overlay and buffer should be added only where there is a well-defined native implementation; until then they should fail explicitly rather than silently change geometry.
  *

  *
That gives a fairly sharp boundary with CGAL. GEOS owns interoperable planar GIS geometry and spatial operations; CGAL owns general computational-geometry machinery. Supporting a standardized curve as a GEOS geometry value doesn't imply supporting every algorithm or every possible parametric curve any more than supporting CircularString did.
  *

  *
On the concrete downstream question: GDAL/OGR already has an SQL/MM-style curved geometry hierarchy and explicit curve-to-linear conversion, while GEOS 3.13 added the corresponding CircularString/CompoundCurve/CurvePolygon family. That is exactly the seam I'm trying to close. A caller that receives one of the additional standardized curve values should be able to pass it through GEOS, inspect basic properties, compose it in a CompoundCurve, and linearise it at a chosen tolerance without first discarding the original curve representation outside GEOS.
  *

  *
For clothoids specifically, this isn't only representational. Existing computational work gives practical algorithms for point evaluation, length/parameter handling, bounding, linearisation and intersection/distance as later increments; we don't need a generic spline kernel to implement those. The first PR intentionally stops well before the harder topology work.
  *

  *
So I would be happy to narrow the proposal explicitly around that definition. If EllipticalCurve, Clothoid, SpiralCurve and interchange-only NURBS are still considered outside GEOS under that boundary, that's useful guidance. But I think that is a much more specific design question than whether GEOS should grow into CGAL.

________________________________
From: Daniel Baston <dbaston at gmail.com>
Sent: Friday, 30 October 2026 18:21:31
To: Jeroen Bloemscheer <jeroen.bloemscheer at merkator.com>
Cc: geos-devel at lists.osgeo.org <geos-devel at lists.osgeo.org>
Subject: Re: Elliptical Curve, NURBS, Clothoid, Spiral Curve

[U ontvang niet vaak e-mail van dbaston at gmail.com. Meer informatie over waarom dit belangrijk is, vindt u op https://aka.ms/LearnAboutSenderIdentification]

It would be great if we could go back in time and have a common
geometry representation that's used by everyone, but that's not how
the ecosystem developed. The downstream projects I'm familiar with
have their own geometry representations that are converted to GEOS to
perform a particular spatial operation. In the absence of support for
spatial operations on these types, a GEOS in-memory representation
provides no real value. You say that "the usual answer is to linearise
them before GEOS sees them" but you're not saying what software wants
to use GEOS to work with these types, or what operations it wants to
perform that currently require linearization.

Dan


On Fri, Oct 30, 2026 at 1:03 PM Jeroen Bloemscheer
<jeroen.bloemscheer at merkator.com> wrote:
>
> Hi Dan,
>
> Thanks, that's a fair question.
>
> I think the question is less whether these curves are "GIS" in the traditional sense, and more whether GEOS should be able to represent and operate on geometry that already exists in the systems built on top of it. PostGIS, Shapely, and QGIS all sit on GEOS, while rail, road, and similar engineering workflows already use these transition geometries. Today the usual answer is to linearise them before GEOS sees them.
>
> That seems like the wrong boundary to me. SQL/MM already defines the geometry model, so GEOS does not need to invent one. If GEOS implements that model once, downstream projects can share the same representation and behaviour instead of each adding its own approximation or adapter.
>
> I'm not proposing that every operation has to arrive at once. #1566 is deliberately small: representation, I/O, length, envelope, and linearisation, with unsupported operations throwing rather than guessing. That gives downstream projects something they can build on without pretending GEOS already supports more than it does.
>
> And on maintenance, I'm not proposing to drop this on the existing maintainers. I'll maintain the curve code and respond to issues with it.
>
> So for me the useful question is: is representing these standardized curve types, and providing a path for downstream projects to use them without first destroying the curve information, within GEOS's scope? I think it is.
>
> ________________________________
>
> From: Daniel Baston <dbaston at gmail.com>
> Sent: Friday, October 30, 2026 2:28 PM
> To: Jeroen Bloemscheer <jeroen.bloemscheer at merkator.com>
> Cc: Nyall Dawson <nyall.dawson at gmail.com>; geos-devel at lists.osgeo.org <geos-devel at lists.osgeo.org>
> Subject: Re: Elliptical Curve, NURBS, Clothoid, Spiral Curve
>
> The primary question for me is not about the quality or provenance of the PRs, but whether it makes sense for GEOS to handle these types at all.
>
> I'd rather not derail that discussion with an AI debate, although I can see that it will be probably be necessary under a separate thread.
>
> Dan
>
> On Fri, Oct 30, 2026 at 7:15 AM Jeroen Bloemscheer <jeroen.bloemscheer at merkator.com> wrote:
>
> I think there are two separate discussions here: whether GEOS should have a policy around LLM-assisted development, and whether this particular contribution meets GEOS quality standards.
>
> For the latter, the code is not being submitted on faith. The implementation has been validated using proofs and working ArcGIS Pro notebooks, and the results are reproducible and independently verifiable.
>
> If there are concerns about the algorithm, implementation details, performance, or maintainability, I'm happy to discuss those. But I don't think "vibe coded" is an accurate characterization of the work.
>
> Jeroen
>
> ________________________________
> Jeroen Bloemscheer
> Geo-IT Consultant
> Zaltbommel
>
>
> m: +31 (0)6 478 728 18
> e:  jeroen.bloemscheer at merkator.com
>
>
> Merkator BV
> Hogeweg 137a
> 5301 LL Zaltbommel(NL)
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.merkator.com%2F&data=05%7C02%7Cjeroen.bloemscheer%40merkator.com%7C157ca7f967a24810c02908df36aa45b4%7Ca17ec843af694e17a6fc3e803a903e14%7C0%7C0%7C639289777086333234%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=Uzd7sGjeSbzeUzqAY9zMMl5gPlskqOsePHam6N%2F%2BTQo%3D&reserved=0<http://www.merkator.com/>
> ________________________________
>
> This email (including any attachments to it) is confidential, legally privileged, subject to copyright and is sent for the personal attention of the intended recipient only. If you have received this email in error, please advise us immediately and delete it. You are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Although we have taken reasonable precautions to ensure no viruses are present in this email, we cannot accept responsibility for any loss or damage arising from the viruses in this email or attachments. We exclude any liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided in this email or its attachments, unless that information is subsequently confirmed in writing.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20261101/93fad848/attachment-0001.htm>


More information about the geos-devel mailing list