Ticket #1291 (new enhancement)

Opened 2 years ago

Last modified 12 months ago

Create curve lines and polygons from points, similar to ST_MakeLine

Reported by: realityexists Owned by: pramsey
Priority: medium Milestone: PostGIS 2.2.0
Component: postgis Version: 1.5.X
Keywords: Cc:

Description

Currently there appears to be no way to create a CIRCULARSTRING, COMPOUNDCURVE or CURVEPOLYGON, except using ST_GeomFromText(). This does not allow the points to be calculated as part of the same SQL statement (eg. transformed from another SRID). Please add:

1) a function similar to ST_MakeLine for CIRCULARSTRING

2) a similar function for COMPOUNDCURVE

3) support for CIRCULARSTRING and COMPOUNDSTRING to ST_MakePolygon (so it returns CURVEPOLYGON)

Eg.

ST_MakeCurveLine(ST_MakePoint(1,2), ST_MakePoint(3,4), ST_MakePoint(5,6))

=> CIRCULARSTRING(1 2, 3 4, 5 6)

ST_MakeCurveLine(ARRAY[ST_MakePoint(1,2), ST_MakePoint(3,4), ST_MakePoint(5,6), ST_MakePoint(7,8), ST_MakePoint(9,10)])

=> CIRCULARSTRING(1 2, 3 4, 5 6,7 8,9 10)

ST_MakeCompoundCurve(ARRAY[ST_GeomFromText('CIRCULARSTRING(0 0,2 0, 2 1, 2 3, 4 3)'), ST_GeomFromText('LINESTRING(4 3, 4 5, 1 4, 0 0)'))

=> COMPOUNDCURVE(CIRCULARSTRING(0 0,2 0, 2 1, 2 3, 4 3),(4 3, 4 5, 1 4, 0 0))

ST_MakePolygon(ST_GeomFromText('COMPOUNDCURVE(CIRCULARSTRING(0 0,2 0, 2 1, 2 3, 4 3),(4 3, 4 5, 1 4, 0 0))'), ST_GeomFromText('CIRCULARSTRING(1.7 1, 1.4 0.4, 1.6 0.4, 1.6 0.5, 1.7 1)'))

=> CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(0 0,2 0, 2 1, 2 3, 4 3),(4 3, 4 5, 1 4, 0 0)), CIRCULARSTRING(1.7 1, 1.4 0.4, 1.6 0.4, 1.6 0.5, 1.7 1))

Change History

Changed 2 years ago by robe

See related #1286 not sure which is the most extensible/easiest approach to go

Changed 2 years ago by strk

  • milestone changed from PostGIS 2.0.0 to PostGIS 2.1.0

This one will have to wait

Changed 12 months ago by robe

  • milestone changed from PostGIS 2.1.0 to PostGIS 2.2.0
Note: See TracTickets for help on using tickets.