[postgis-tickets] r15455 - Update 3D example and put a note about function may return the same geometry.
Regina Obe
lr at pcorp.us
Fri Jun 23 21:34:19 PDT 2017
Author: robe
Date: 2017-06-23 21:34:19 -0700 (Fri, 23 Jun 2017)
New Revision: 15455
Modified:
trunk/doc/reference_processing.xml
Log:
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
Modified: trunk/doc/reference_processing.xml
===================================================================
--- trunk/doc/reference_processing.xml 2017-06-24 04:33:02 UTC (rev 15454)
+++ trunk/doc/reference_processing.xml 2017-06-24 04:34:19 UTC (rev 15455)
@@ -1912,8 +1912,8 @@
<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 @@
<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,18 +1937,23 @@
| -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)')));
+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;
- st_asewkt
-------------------------------------
- CIRCULARSTRING(1 2 3,5 6 4,9 10 4)
+ 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>
- </programlisting>
- </refsection>
-
<!-- Optionally add a "See Also" section -->
<refsection>
<title>See Also</title>
More information about the postgis-tickets
mailing list