From: Regina Obe Date: Sat, 24 Jun 2017 04:34:19 +0000 (+0000) Subject: Update 3D example and put a note about function may return the same geometry. X-Git-Tag: 2.4.0alpha~54 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=df3eb30889f413beb33c2c1850e5238d60241541;p=postgis Update 3D example and put a note about function may return the same geometry. References #3702 for PostGIS 2.4 (trunk) Last commit was for PostGIS 2.3.3 (mistakenly noted as 2.4) Closes #3702 git-svn-id: http://svn.osgeo.org/postgis/trunk@15455 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference_processing.xml b/doc/reference_processing.xml index 424d3c949..63012155e 100644 --- a/doc/reference_processing.xml +++ b/doc/reference_processing.xml @@ -1912,8 +1912,8 @@ from ST_GeomFromText('LINESTRING Z (2 2 6,1.5 1.5 7,1 1 8,0.5 0.5 8,0 0 10)') A Description - Converts plain LINESTRING/POLYGONS to CIRCULAR STRINGs and Curved Polygons. Note much fewer points are needed to describe the curved equivalent. - + Converts plain LINESTRING/POLYGON to CIRCULAR STRINGs and Curved Polygons. Note much fewer points are needed to describe the curved equivalent. + If the input LINESTRING/POLYGON is not curved enough to clearly represent a curve, the function will return the same input geometry. Availability: 1.2.2? &Z_support; &curve_support; @@ -1921,9 +1921,9 @@ from ST_GeomFromText('LINESTRING Z (2 2 6,1.5 1.5 7,1 1 8,0.5 0.5 8,0 0 10)') A - Examples: 2D + Examples - + -- 2D Example SELECT ST_AsText(ST_LineToCurve(foo.the_geom)) As curvedastext,ST_AsText(foo.the_geom) As non_curvedastext FROM (SELECT ST_Buffer('POINT(1 3)'::geometry, 3) As the_geom) As foo; @@ -1937,15 +1937,20 @@ CURVEPOLYGON(CIRCULARSTRING(4 3,3.12132034355964 0.878679656440359, | POLYGON((4 | -0.666710699058802 0.505591163092361,-1.12132034355964 0.878679656440353, | -1.49440883690763 1.33328930094119,-1.77163859753386 1.85194970290472 | --ETC-- ,3.94235584120969 3.58527096604839,4 3)) ---3D example -SELECT ST_AsEWKT(ST_LineToCurve(ST_GeomFromEWKT('LINESTRING(1 2 3, 3 4 8, 5 6 4, 7 8 4, 9 10 4)'))); - - st_asewkt ------------------------------------- - CIRCULARSTRING(1 2 3,5 6 4,9 10 4) - - +--3D example +SELECT ST_AsText(ST_LineToCurve(geom)) As curved, ST_AsText(geom) AS not_curved +FROM (SELECT ST_Translate(ST_Force3D(ST_Boundary(ST_Buffer(ST_Point(1,3), 2,2))),0,0,3) AS geom) AS foo; + + curved | not_curved +------------------------------------------------------+--------------------------------------------------------------------- + CIRCULARSTRING Z (3 3 3,-1 2.99999999999999 3,3 3 3) | LINESTRING Z (3 3 3,2.4142135623731 1.58578643762691 3,1 1 3, + | -0.414213562373092 1.5857864376269 3,-1 2.99999999999999 3, + | -0.414213562373101 4.41421356237309 3, + | 0.999999999999991 5 3,2.41421356237309 4.4142135623731 3,3 3 3) +(1 row) + +