]> granicus.if.org Git - postgis/commitdiff
Update 3D example and put a note about function may return the same geometry.
authorRegina Obe <lr@pcorp.us>
Sat, 24 Jun 2017 04:34:19 +0000 (04:34 +0000)
committerRegina Obe <lr@pcorp.us>
Sat, 24 Jun 2017 04:34:19 +0000 (04:34 +0000)
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

doc/reference_processing.xml

index 424d3c949adb215266756e5cbb5affaa22b07490..63012155e69ae7b89c0eeed577da9b106adb2c33 100644 (file)
@@ -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
          <refsection>
                <title>Description</title>
 
-               <para>Converts plain LINESTRING/POLYGONS to CIRCULAR STRINGs and Curved Polygons.  Note much fewer points are needed to describe the curved equivalent.</para>
-
+               <para>Converts plain LINESTRING/POLYGON to CIRCULAR STRINGs and Curved Polygons.  Note much fewer points are needed to describe the curved equivalent.</para>
+               <note><para>If the input LINESTRING/POLYGON is not curved enough to clearly represent a curve, the function will return the same input geometry.</para></note>
                <para>Availability: 1.2.2?</para>
                <para>&Z_support;</para>
                <para>&curve_support;</para>
@@ -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
 
 
          <refsection>
-               <title>Examples: 2D</title>
+               <title>Examples</title>
 
-               <programlisting>
+               <programlisting> -- 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)
 
-               </programlisting>
-         </refsection>
+--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)
+</programlisting>
+       </refsection>