From: Regina Obe Date: Wed, 15 Oct 2008 13:39:03 +0000 (+0000) Subject: Move over ST_Segmentize and ST_LineMerge X-Git-Tag: 1.4.0b1~622 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=68ce6df7c2ba678bce53037acb7c2b93963957ba;p=postgis Move over ST_Segmentize and ST_LineMerge git-svn-id: http://svn.osgeo.org/postgis/trunk@3110 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference.xml b/doc/reference.xml index 79a1e7d99..5675dc90d 100644 --- a/doc/reference.xml +++ b/doc/reference.xml @@ -1140,27 +1140,6 @@ z' = z This method is a subcase of the 3D method - - ST_Segmentize(geometry, maxlength) - - - Return a modified geometry having no segment longer then the - given distance. Interpolated points will have Z and M values (if - needed) set to 0. Distance computation is performed in 2d - only. - - - - - ST_LineMerge(geometry) - - - Returns a (set of) LineString(s) formed by sewing together - constituent linework of input. - - Availability: 1.1.0 - requires GEOS >= 2.1.0 - - @@ -1191,7 +1170,7 @@ z' = z This method is a subcase of the 3D method - + ST_Line_Substring(linestring geometry, startfraction float8, endfraction float8) diff --git a/doc/reference_new.xml b/doc/reference_new.xml index aaafc7da8..d8c40134f 100644 --- a/doc/reference_new.xml +++ b/doc/reference_new.xml @@ -2505,7 +2505,63 @@ Line[ZB] with 2 points : Polygon[ZB] with 1 rings See Also , - + + + + + ST_LineMerge + + Returns a (set of) LineString(s) formed by sewing together + a MULTILINESTRING. + + + + + + geometry ST_LineMerge + geometry amultilinestring + + + + + + Description + + Returns a (set of) LineString(s) formed by sewing together + the constituent line work of a MULTILINESTRING. + Only use with MULTILINESTRING/LINESTRINGs. If you feed a polygon or geometry collection into this function, it + will return an empty GEOMETRYCOLLECTION + + Availability: 1.1.0 + requires GEOS >= 2.1.0 + + + + Examples + + SELECT ST_AsText(ST_LineMerge( +ST_GeomFromText('MULTILINESTRING((-29 -27,-30 -29.7,-36 -31,-45 -33),(-45 -33,-46 -32))') + ) +); + st_astext + -------------------------------------------------------------------------------------------------- + LINESTRING(-29 -27,-30 -29.7,-36 -31,-45 -33,-46 -32) + (1 row) + --If can't be merged - original MULTILINESTRING is returned + SELECT ST_AsText(ST_LineMerge( + ST_GeomFromText('MULTILINESTRING((-29 -27,-30 -29.7,-36 -31,-45 -33),(-45.2 -33.2,-46 -32))') + ) + ); + st_astext + ---------------- + MULTILINESTRING((-45.2 -33.2,-46 -32),(-29 -27,-30 -29.7,-36 -31,-45 -33)) + + + + See Also + , + + @@ -2624,6 +2680,64 @@ LINESTRING(1 2,1 10) | LINESTRING(1 10,1 2) + + + + ST_Segmentize + + Return a modified geometry having no segment longer than the + given distance. Distance computation is performed in 2d + only. + + + + + + geometry ST_Segmentize + geometry geomA + float max_length + + + + + + Description + + Returns a modified geometry having no segment longer than the + given distance. Distance computation is performed in 2d + only. + Availability: 1.2.2 + This will only increase segments. It will not lengthen segments shorter than + max length + + + + Examples + + SELECT ST_AsText(ST_Segmentize( +ST_GeomFromText('MULTILINESTRING((-29 -27,-30 -29.7,-36 -31,-45 -33),(-45 -33,-46 -32))') + ,5) +); + st_astext + -------------------------------------------------------------------------------------------------- + MULTILINESTRING((-29 -27,-30 -29.7,-34.886615700134 -30.758766735029,-36 -31, + -40.8809353009198 -32.0846522890933,-45 -33), + (-45 -33,-46 -32)) + (1 row) + + SELECT ST_AsText(ST_Segmentize(ST_GeomFromText('POLYGON((-29 28, -30 40, -29 28))'),10)); + st_astext + ----------------------- + POLYGON((-29 28,-29.8304547985374 37.9654575824488,-30 40,-29.1695452014626 30.0345424175512,-29 28)) + (1 row) + + + + + See Also + + +