Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ST_CurveN and ST_NumCurves plus consistency #762

Closed
wants to merge 9 commits into from

Conversation

pramsey
Copy link
Member

@pramsey pramsey commented Feb 20, 2024

Accessors for the components of CompoundCurve, and changes to geometry accessors relative to CompoundCurve to respect that it is a unitary object, just like LineString and CircularString.

ST_GeometryType(ST_CurveN(geom,1)) as curven_1,
ST_GeometryType(ST_CurveN(geom,2)) as curven_2,
ST_GeometryType(ST_CurveN(geom,3)) as curven_3,
ST_GeometryType(ST_CurveN(geom,3)) as curven_4,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this repeats the curven_3 query. Is that indented, or was it rather ST_CurveN(geom,4) ?

<programlisting>
-- Returns 3
SELECT ST_NumCurves('COMPOUNDCURVE(
LINESTRING(2 2, 2.5 2.5),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding of https://github.com/postgis/postgis/blob/8ed84517a9b86c86724504d1b6a0f0c1ccd86cf6/doc/bnf-wkt.txt is that the explicit LINESTRING() keyword within a COMPOUNDCURVE is not allowed, and a PostGIS, OGR, etc. extension. It should probably not be advertized here (and below)

@pramsey pramsey closed this Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants