[postgis-commits] svn - r3058 - trunk/doc

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Fri Oct 3 02:22:14 PDT 2008


Author: robe
Date: 2008-10-03 02:22:13 -0700 (Fri, 03 Oct 2008)
New Revision: 3058

Modified:
   trunk/doc/reference_new.xml
Log:
Add more examples of 3d use and annotate more 3d functions

Modified: trunk/doc/reference_new.xml
===================================================================
--- trunk/doc/reference_new.xml	2008-10-03 01:50:38 UTC (rev 3057)
+++ trunk/doc/reference_new.xml	2008-10-03 09:22:13 UTC (rev 3058)
@@ -700,8 +700,8 @@
         constraints and reference in geometry_columns. Note: uses
         current_schema() on schema-aware pgsql installations if schema is not
         provided.</para>
-			<!-- Optionally mention 3d support -->
-    <para><inlinemediaobject>
+		<!-- Optionally mention 3d support -->
+		<para><inlinemediaobject>
         <imageobject>
           <imagedata fileref="images/check.png" />
         </imageobject>
@@ -1830,6 +1830,13 @@
 			
 			<para>Returns the coordinate dimension of the geometry.  PostGIS supports 2 -  (x,y) , 
 			3 -  (x,y,z) or 2D with measure - x,y,m, and 4 - 3D with measure space x,y,z,m</para>
+			
+			<!-- Optionally mention 3d support -->
+			<para><inlinemediaobject>
+			<imageobject>
+			  <imagedata fileref="images/check.png" />
+			</imageobject>
+		  </inlinemediaobject> This function supports 3d and will not drop the z-index.</para>
 		</refsection>
 		
 		<refsection>
@@ -1869,6 +1876,12 @@
 			<title>Description</title>
 			
 			<para>Return the number of points in a geometry.  Works for all geometries.</para>
+						<!-- Optionally mention 3d support -->
+			<para><inlinemediaobject>
+			<imageobject>
+			  <imagedata fileref="images/check.png" />
+			</imageobject>
+		  </inlinemediaobject> This function supports 3d and will not drop the z-index.</para>
 		</refsection>
 		
 		<refsection>
@@ -1877,6 +1890,11 @@
 			<programlisting>SELECT ST_NPoints(ST_GeomFromText('LINESTRING(77.29 29.07,77.42 29.26,77.27 29.31,77.29 29.07)'));
 			--result
 			4
+			
+			--Polygon in 3d space
+			SELECT ST_NPoints(ST_GeomFromEWKT('LINESTRING(77.29 29.07 1,77.42 29.26 0,77.27 29.31 -1,77.29 29.07 3)'))
+			--result
+			4
 			</programlisting>
 		</refsection>
 		<refsection>
@@ -2104,22 +2122,40 @@
           </imageobject>
         </inlinemediaobject> This method implements the SQL/MM specification:
       SQL-MM 3: 7.1.3</para>
+	  
+		<!-- Optionally mention 3d support -->	
+		<para>
+			<inlinemediaobject>
+			<imageobject>
+			  <imagedata fileref="images/check.png" />
+			</imageobject>
+			</inlinemediaobject> This function supports 3d and will not drop the z-index.
+		</para>
     </refsection>
   
     <refsection>
       <title>Examples</title>
   
-      <programlisting>postgis=# SELECT ST_AsText(ST_StartPoint('LINESTRING(0 1, 0 2)'::geometry));
+      <programlisting>SELECT ST_AsText(ST_StartPoint('LINESTRING(0 1, 0 2)'::geometry));
  st_astext
 ------------
  POINT(0 1)
 (1 row)
 
-postgis=# SELECT ST_StartPoint('POINT(0 1)'::geometry) IS NULL AS is_null;
+SELECT ST_StartPoint('POINT(0 1)'::geometry) IS NULL AS is_null;
   is_null
 ----------
  t
-(1 row)</programlisting>
+(1 row)
+
+--3d line
+SELECT ST_AsEWKT(ST_StartPoint('LINESTRING(0 1 1, 0 2 2)'::geometry));
+ st_asewkt
+------------
+ POINT(0 1 1)
+(1 row)
+
+</programlisting>
     </refsection>
   
     <refsection>
@@ -2151,6 +2187,14 @@
         <title>Description</title>
     
         <para>Returns a text summary of the contents of the geometry.</para>
+		<!-- Optionally mention 3d support -->	
+		<para>
+			<inlinemediaobject>
+			<imageobject>
+			  <imagedata fileref="images/check.png" />
+			</imageobject>
+			</inlinemediaobject> This function supports 3d and will not drop the z-index.
+		</para>
 
       </refsection>
     
@@ -2166,6 +2210,19 @@
 Line[B] with 2 points : Polygon[B] with 1 rings
                       :    ring 0 has 5 points
                       :
+					  
+--3d polygon
+SELECT ST_Summary(ST_GeomFromEWKT('LINESTRING(0 0 1, 1 1 1)')) As good_line,
+	ST_Summary(ST_GeomFromEWKT('POLYGON((0 0 1, 1 1 2, 1 2 3, 1 1 1, 0 0 1))')) As poly
+	
+--results
+      good_line       |        poly
+----------------------+-------------------------
+                      |
+Line[ZB] with 2 points : Polygon[ZB] with 1 rings
+                      :    ring 0 has 5 points
+                      :
+					  
 </programlisting>
       </refsection>
     
@@ -2211,6 +2268,14 @@
 				(0-based index). Third parameter can be omitted or set to -1 for
 				appending.</para>
 			<para>Availability: 1.1.0</para>
+			<!-- Optionally mention 3d support -->	
+			<para>
+				<inlinemediaobject>
+				<imageobject>
+				  <imagedata fileref="images/check.png" />
+				</imageobject>
+				</inlinemediaobject> This function supports 3d and will not drop the z-index.
+			</para>
 		  </refsection>
 		
 		  <refsection>
@@ -2223,6 +2288,14 @@
 		SET the_geom = ST_AddPoint(the_geom, ST_StartPoint(the_geom))
 		FROM sometable
 		WHERE ST_IsClosed(the_geom) = false;
+		
+		--Adding point to a 3-d line
+		SELECT ST_AsEWKT(ST_AddPoint(ST_GeomFromEWKT('LINESTRING(0 0 1, 1 1 1)'), ST_MakePoint(1, 2, 3)));
+		
+		--result
+		st_asewkt
+		----------
+		LINESTRING(0 0 1,1 1 1,1 2 3)
 			</programlisting>
 		  </refsection>
 		  <refsection>



More information about the postgis-commits mailing list