[postgis-tickets] r14495 - Example for ST_GeneratePoints

Regina Obe lr at pcorp.us
Thu Dec 17 15:22:31 PST 2015


Author: robe
Date: 2015-12-17 15:22:30 -0800 (Thu, 17 Dec 2015)
New Revision: 14495

Added:
   trunk/doc/html/image_src/st_generatepoints01.wkt
Modified:
   trunk/doc/html/image_src/Makefile.in
   trunk/doc/reference_processing.xml
Log:
Example for ST_GeneratePoints
references #3399

Modified: trunk/doc/html/image_src/Makefile.in
===================================================================
--- trunk/doc/html/image_src/Makefile.in	2015-12-17 19:18:53 UTC (rev 14494)
+++ trunk/doc/html/image_src/Makefile.in	2015-12-17 23:22:30 UTC (rev 14495)
@@ -63,6 +63,7 @@
 	../images/st_dumppoints01.png \
 	../images/st_extrude01.png \
 	../images/st_extrude03.png \
+	../images/st_generatepoints01.png \
 	../images/st_issimple01.png \
 	../images/st_issimple02.png \
 	../images/st_issimple03.png \

Added: trunk/doc/html/image_src/st_generatepoints01.wkt
===================================================================
--- trunk/doc/html/image_src/st_generatepoints01.wkt	                        (rev 0)
+++ trunk/doc/html/image_src/st_generatepoints01.wkt	2015-12-17 23:22:30 UTC (rev 14495)
@@ -0,0 +1,2 @@
+Style2;POLYGON((150 90,149.039264020162 80.2454838991936,146.193976625564 70.8658283817455,141.573480615127 62.2214883490199,135.355339059327 54.6446609406727,127.77851165098 48.4265193848728,119.134171618255 43.8060233744357,109.754516100806 40.9607359798385,100 40,90.2454838991937 40.9607359798385,80.8658283817456 43.8060233744356,72.22148834902 48.4265193848727,64.6446609406727 54.6446609406725,58.4265193848728 62.2214883490198,53.8060233744357 70.8658283817454,50.9607359798385 80.2454838991934,50 89.9999999999998,50.9607359798384 99.7545161008062,53.8060233744356 109.134171618254,58.4265193848726 117.77851165098,64.6446609406725 125.355339059327,72.2214883490197 131.573480615127,80.8658283817453 136.193976625564,90.2454838991934 139.039264020161,99.9999999999998 140,109.754516100806 139.039264020162,119.134171618254 136.193976625564,127.77851165098 131.573480615127,135.355339059327 125.355339059327,141.573480615127 117.77851165098,146.193976625564 109.134171618255,149.0392640201
 62 99.7545161008065,150 90))
+Style1-thinline;MULTIPOINT(102.722861415448 109.63774529252,149.121982482376 109.73967711417,143.583483382672 71.2656025879696,43.6127811517685 46.1928159428694,64.0937528611103 64.3971068453017,158.682821131016 128.593401898251,144.217047639393 142.958464308603,143.193456831568 81.4453566087832,137.923520615253 135.276955473495,149.037141026032 48.2552568132572,85.2284310434278 92.0542008728294,107.117526779992 101.481368449965)

Modified: trunk/doc/reference_processing.xml
===================================================================
--- trunk/doc/reference_processing.xml	2015-12-17 19:18:53 UTC (rev 14494)
+++ trunk/doc/reference_processing.xml	2015-12-17 23:22:30 UTC (rev 14495)
@@ -3674,21 +3674,59 @@
 				<type>numeric</type> 
 			</paramdef>
 		  </funcprototype>
-
+		
 		</funcsynopsis>
-	  </refsynopsisdiv>
-
-	  <refsection>
+		</refsynopsisdiv>
+		
+		<refsection>
 		<title>Description</title>
-
+		
 		<para>
 			ST_GeneratePoints generates pseudo-random points until the requested number are
 			found within the input area.
 		</para>	
 			
 		<para>Availability: 2.3.0</para>
-	  </refsection>
-
+		</refsection>
+	  
+		<refsection>
+			<title>Examples</title>
+		
+			<informaltable>
+			  <tgroup cols="2">
+				<tbody>
+				  <row>
+					<entry>
+						<para><informalfigure>
+						<mediaobject>
+						  <imageobject>
+							<imagedata fileref="images/st_buffer01.png" />
+						  </imageobject>
+						  <caption><para>Original Polygon</para></caption>
+						</mediaobject>
+						</informalfigure>
+						</para>
+					</entry>
+					
+					<entry><para><informalfigure>
+						<mediaobject>
+						  <imageobject>
+							<imagedata fileref="images/st_generatepoints01.png" />
+						  </imageobject>
+						  <caption><para>Generated 12 Points overlaid on top of original polygon</para></caption>
+						</mediaobject>
+					  </informalfigure>
+						<programlisting>SELECT ST_GeneratePoints(
+	ST_Buffer(
+		ST_GeomFromText(
+		'LINESTRING(50 50,150 150,150 50)'
+		), 10, 'endcap=round join=round'), 12);</programlisting>
+					</para></entry>
+				  </row>
+			</tbody>
+			</tgroup>
+		</informaltable>
+		</refsection>
 	</refentry>
 	
 	



More information about the postgis-tickets mailing list