[postgis-tickets] r14505 - Add examples for ST_Voronoi

Regina Obe lr at pcorp.us
Fri Dec 18 22:53:12 PST 2015


Author: robe
Date: 2015-12-18 22:53:12 -0800 (Fri, 18 Dec 2015)
New Revision: 14505

Added:
   trunk/doc/html/image_src/st_voronoi01.wkt
   trunk/doc/html/image_src/st_voronoi02.wkt
   trunk/doc/html/image_src/st_voronoi03.wkt
Modified:
   trunk/doc/html/image_src/Makefile.in
   trunk/doc/reference_processing.xml
Log:
Add examples for ST_Voronoi 
references #2259

Modified: trunk/doc/html/image_src/Makefile.in
===================================================================
--- trunk/doc/html/image_src/Makefile.in	2015-12-18 16:32:02 UTC (rev 14504)
+++ trunk/doc/html/image_src/Makefile.in	2015-12-19 06:53:12 UTC (rev 14505)
@@ -131,6 +131,9 @@
 	../images/st_touches04.png \
 	../images/st_touches05.png \
 	../images/st_touches06.png \
+	../images/st_voronoi01.png \
+	../images/st_voronoi02.png \
+	../images/st_voronoi03.png \
 	../images/st_within01.png
 
 # Images that are created with dimensions 100x100

Added: trunk/doc/html/image_src/st_voronoi01.wkt
===================================================================
--- trunk/doc/html/image_src/st_voronoi01.wkt	                        (rev 0)
+++ trunk/doc/html/image_src/st_voronoi01.wkt	2015-12-19 06:53:12 UTC (rev 14505)
@@ -0,0 +1,6 @@
+Style1;POLYGON((-110 43.3333333333333,-110 270,100.5 270,59.3478260869565 132.826086956522,36.8181818181818 92.2727272727273,-110 43.3333333333333))
+Style2;POLYGON((55 -90,-110 -90,-110 43.3333333333333,36.8181818181818 92.2727272727273,55 79.2857142857143,55 -90))
+Style3;POLYGON((230 47.5,230 -20.7142857142857,55 79.2857142857143,36.8181818181818 92.2727272727273,59.3478260869565 132.826086956522,230 47.5))
+Style4;POLYGON((230 -20.7142857142857,230 -90,55 -90,55 79.2857142857143,230 -20.7142857142857))
+Style5;POLYGON((100.5 270,230 270,230 47.5,59.3478260869565 132.826086956522,100.5 270))
+Style1-thinline;MULTIPOINT (50 30, 60 30, 100 100,10 150, 110 120)

Added: trunk/doc/html/image_src/st_voronoi02.wkt
===================================================================
--- trunk/doc/html/image_src/st_voronoi02.wkt	                        (rev 0)
+++ trunk/doc/html/image_src/st_voronoi02.wkt	2015-12-19 06:53:12 UTC (rev 14505)
@@ -0,0 +1,4 @@
+Style1;POLYGON((-110 43.3333333333333,-110 270,135.555555555556 270,36.8181818181818 92.2727272727273,-110 43.3333333333333))
+Style2;POLYGON((135.555555555556 270,230 270,230 -45.7142857142858,36.8181818181818 92.2727272727273,135.555555555556 270))
+Style3;POLYGON((230 -45.7142857142858,230 -90,-110 -90,-110 43.3333333333333,36.8181818181818 92.2727272727273,230 -45.7142857142858))
+Style1-thinline;MULTIPOINT (50 30, 60 30, 100 100,10 150, 110 120)

Added: trunk/doc/html/image_src/st_voronoi03.wkt
===================================================================
--- trunk/doc/html/image_src/st_voronoi03.wkt	                        (rev 0)
+++ trunk/doc/html/image_src/st_voronoi03.wkt	2015-12-19 06:53:12 UTC (rev 14505)
@@ -0,0 +1,4 @@
+Style1;LINESTRING(135.555555555556 270,36.8181818181818 92.2727272727273)
+Style2;LINESTRING(36.8181818181818 92.2727272727273,-110 43.3333333333333)
+Style3;LINESTRING(230 -45.7142857142858,36.8181818181818 92.2727272727273)
+Style1-thinline;MULTIPOINT (50 30, 60 30, 100 100,10 150, 110 120)

Modified: trunk/doc/reference_processing.xml
===================================================================
--- trunk/doc/reference_processing.xml	2015-12-18 16:32:02 UTC (rev 14504)
+++ trunk/doc/reference_processing.xml	2015-12-19 06:53:12 UTC (rev 14505)
@@ -3618,7 +3618,7 @@
 		<title>Description</title>
 
 		<para>
-			ST_Voronoi computes a two-dimensional Voronoi diagram from the vertices of 
+			ST_Voronoi computes a two-dimensional <ulink url="https://en.wikipedia.org/wiki/Voronoi_diagram">Voronoi diagram</ulink> from the vertices of 
 			the supplied geometry.  By default, the result will be a GeometryCollection of
 			Polygons that covers an envelope larger than the extent of the input vertices.
 		</para>	
@@ -3642,7 +3642,75 @@
 
 		<para>Availability: 2.3.0 - requires GEOS >= 3.5.0.</para>
 	  </refsection>
+	  
+	  <!-- Examples -->
+	  <refsection>
+		<title>Examples</title>
+		<informaltable>
+		  <tgroup cols="1">
+			<tbody>
+			  <row>
+				<entry>
+					<para><informalfigure>
+					<mediaobject>
+					  <imageobject>
+						<imagedata fileref="images/st_voronoi01.png" />
+					  </imageobject>
+					  <caption><para>Points overlaid on top of voronoi diagram</para></caption>
+					</mediaobject>
+					</informalfigure>
+					<programlisting>SELECT 
+	ST_Voronoi(geom) As geom
+FROM (SELECT 'MULTIPOINT (50 30, 60 30, 100 100,10 150, 110 120)'::geometry As geom ) As g;</programlisting>
+<screen> -- ST_AsText output
+GEOMETRYCOLLECTION(POLYGON((-110 43.3333333333333,-110 270,100.5 270,59.3478260869565 132.826086956522,36.8181818181818 92.2727272727273,-110 43.3333333333333)), 
+POLYGON((55 -90,-110 -90,-110 43.3333333333333,36.8181818181818 92.2727272727273,55 79.2857142857143,55 -90)),
+POLYGON((230 47.5,230 -20.7142857142857,55 79.2857142857143,36.8181818181818 92.2727272727273,59.3478260869565 132.826086956522,230 47.5)),POLYGON((230 -20.7142857142857,230 -90,55 -90,55 79.2857142857143,230 -20.7142857142857)),
+POLYGON((100.5 270,230 270,230 47.5,59.3478260869565 132.826086956522,100.5 270)))
+</screen>
+					</para>
+				</entry>
+			</row>
+			<row>	
+				<entry><para><informalfigure>
+					<mediaobject>
+					  <imageobject>
+						<imagedata fileref="images/st_voronoi02.png" />
+					  </imageobject>
+					  <caption><para>Voronoi with tolerance of 30 units</para></caption>
+					</mediaobject>
+				  </informalfigure>
+					<programlisting>SELECT ST_Voronoi(geom, null,30) As geom
+FROM (SELECT 'MULTIPOINT (50 30, 60 30, 100 100,10 150, 110 120)'::geometry As geom ) As g;</programlisting>
+<screen> -- ST_AsText output
+GEOMETRYCOLLECTION(POLYGON((-110 43.3333333333333,-110 270,100.5 270,59.3478260869565 132.826086956522,36.8181818181818 92.2727272727273,-110 43.3333333333333)),
+POLYGON((230 47.5,230 -45.7142857142858,36.8181818181818 92.2727272727273,59.3478260869565 132.826086956522,230 47.5)),POLYGON((230 -45.7142857142858,230 -90,-110 -90,-110 43.3333333333333,36.8181818181818 92.2727272727273,230 -45.7142857142858)),
+POLYGON((100.5 270,230 270,230 47.5,59.3478260869565 132.826086956522,100.5 270)))
+</screen>
+				</para></entry>
+			  </row>
+			 <row>	
+				<entry><para><informalfigure>
+					<mediaobject>
+					  <imageobject>
+						<imagedata fileref="images/st_voronoi03.png" />
+					  </imageobject>
+					  <caption><para>Voronoi with tolerance of 30 units as multilinestring</para></caption>
+					</mediaobject>
+				  </informalfigure>
+					<programlisting>SELECT ST_Voronoi(geom, null,30,false) As geom
+FROM (SELECT 'MULTIPOINT (50 30, 60 30, 100 100,10 150, 110 120)'::geometry As geom ) As g</programlisting>
+<screen> -- ST_AsText output
+MULTILINESTRING((135.555555555556 270,36.8181818181818 92.2727272727273),(36.8181818181818 92.2727272727273,-110 43.3333333333333),(230 -45.7142857142858,36.8181818181818 92.2727272727273))
+</screen>
+				</para></entry>
+			  </row>
+		</tbody>
+		</tgroup>
+		</informaltable>
 
+	  </refsection>
+
 	  <!-- Optionally add a "See Also" section -->
 	  <refsection>
 		<title>See Also</title>



More information about the postgis-tickets mailing list