[postgis-devel] [PostGIS] #1291: Create curve lines and polygons from points, similar to ST_MakeLine
PostGIS
trac at osgeo.org
Sun Nov 13 16:12:29 PST 2011
#1291: Create curve lines and polygons from points, similar to ST_MakeLine
---------------------------+------------------------------------------------
Reporter: realityexists | Owner: pramsey
Type: enhancement | Status: new
Priority: medium | Milestone: PostGIS 2.0.0
Component: postgis | Version: 1.5.X
Keywords: |
---------------------------+------------------------------------------------
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))
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1291>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list