[postgis-commits] svn - r3042 - in trunk/doc: . xsl

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Thu Oct 2 04:40:08 PDT 2008


Author: robe
Date: 2008-10-02 04:40:06 -0700 (Thu, 02 Oct 2008)
New Revision: 3042

Modified:
   trunk/doc/reference_new.xml
   trunk/doc/template.xml
   trunk/doc/xsl/postgis_aggs_mm.xml.xsl
Log:
Start annotating functions that support 3d, add some examples of 3d, update xsl to pull out functions that support 3d in a separate special function index

Modified: trunk/doc/reference_new.xml
===================================================================
--- trunk/doc/reference_new.xml	2008-10-02 11:17:03 UTC (rev 3041)
+++ trunk/doc/reference_new.xml	2008-10-02 11:40:06 UTC (rev 3042)
@@ -1082,6 +1082,12 @@
             might want to use a subselect to order points before feeding them
             to  the aggregate version of this function.</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>
@@ -1100,16 +1106,25 @@
 			<title>Examples: Non-Spatial Aggregate version</title>
 			
 			<para>First example is a simple one off line string composed of 2 points.  The second formulates
-				line strings from 2 points a user draws</para>
+				line strings from 2 points a user draws.  The third is a one-off that joins 2 3d points to create a line in 3d space.</para>
 			<programlisting>
 SELECT ST_AsText(ST_MakeLine(ST_MakePoint(1,2), ST_MakePoint(3,4)));
+      st_astext
+---------------------
+ LINESTRING(1 2,3 4)
+
 SELECT userpoints.id, ST_MakeLine(startpoint, endpoint) As drawn_line
 	FROM userpoints ;
+	
+SELECT ST_AsEWKT(ST_MakeLine(ST_MakePoint(1,2,3), ST_MakePoint(3,4,5)));
+        st_asewkt
+-------------------------
+ LINESTRING(1 2 3,3 4 5)
 			</programlisting>
 		</refsection>
 		<refsection>
 			<title>See Also</title>
-			<para><xref linkend="ST_GeomFromText" />, <xref linkend="ST_MakePoint" /></para>
+			<para><xref linkend="ST_AsEWKT" />, <xref linkend="ST_AsText" />, <xref linkend="ST_GeomFromText" />, <xref linkend="ST_MakePoint" /></para>
 		</refsection>
 	</refentry>	
 	<refentry id="ST_MakePoint">
@@ -1153,6 +1168,13 @@
 			OGC compliant is generally faster and more precise than ST_GeomFromText and ST_PointFromText.  It is also easier
 			to use if you have raw coordinates rather than WKT.</para>
 			<note><para>Note x is longitude and y is latitude</para></note>
+			
+			<!-- 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>
@@ -2640,6 +2662,12 @@
 			<note>
 			  <para>ST_AsEWKB is the reverse of ST_GeomFromEWKB.  Use ST_GeomFromEWKB to convert to a postgis geometry from ST_AsEWKB representation.</para>
 			</note>
+			<!-- 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>
 		
 		
@@ -2707,6 +2735,12 @@
 			<note>
 			  <para>ST_AsEWKT is the reverse of <xref linkend="ST_GeomFromEWKT" />.  Use <xref linkend="ST_GeomFromEWKT" /> to convert to a postgis geometry from ST_AsEWKT representation.</para>
 			</note>
+			<!-- 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>
 		
 		
@@ -4836,6 +4870,12 @@
             returning a Geometry Collection when collecting MULTI geometries,
             one can use the below trick that utilizes <xref linkend="ST_Dump" /> to expand the
             MULTIs out to singles and then regroup them.</para></note>
+		<!-- 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>
@@ -4857,12 +4897,22 @@
 ----------
 MULTIPOINT(1 2,-2 3)
 
+--Collect 2 d points
 SELECT ST_AsText(ST_Collect(ST_GeomFromText('POINT(1 2)'),
 		ST_GeomFromText('POINT(1 2)') ) );
 	
 st_astext
 ----------
-MULTIPOINT(1 2,1 2)</programlisting>
+MULTIPOINT(1 2,1 2)
+
+--Collect 3d points
+SELECT ST_AsEWKT(ST_Collect(ST_GeomFromEWKT('POINT(1 2 3)'),
+		ST_GeomFromEWKT('POINT(1 2 4)') ) );
+	
+        st_asewkt
+-------------------------
+ MULTIPOINT(1 2 3,1 2 4)
+</programlisting>
 	  </refsection>
 	  <refsection>
 		<title>See Also</title>

Modified: trunk/doc/template.xml
===================================================================
--- trunk/doc/template.xml	2008-10-02 11:17:03 UTC (rev 3041)
+++ trunk/doc/template.xml	2008-10-02 11:40:06 UTC (rev 3042)
@@ -52,7 +52,15 @@
         </imageobject>
       </inlinemediaobject> This method implements the SQL/MM specification:
     SQL-MM 3: 5.1.23</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>

Modified: trunk/doc/xsl/postgis_aggs_mm.xml.xsl
===================================================================
--- trunk/doc/xsl/postgis_aggs_mm.xml.xsl	2008-10-02 11:17:03 UTC (rev 3041)
+++ trunk/doc/xsl/postgis_aggs_mm.xml.xsl	2008-10-02 11:40:06 UTC (rev 3042)
@@ -52,7 +52,7 @@
 						<xsl:value-of select="@id" />
 					</xsl:variable>
 				
-			<!-- For each section if there is not that it implements SQL/MM catalog it -->
+			<!-- For each section if there is note that it implements SQL/MM catalog it -->
 						<xsl:for-each select="refsection">
 							<xsl:for-each select="para">
 								<xsl:choose>
@@ -65,6 +65,34 @@
 				</xsl:for-each>
 				</itemizedlist>
 		</sect1>
+		
+		<sect1>
+			<title>PostGIS Functions that support 3D</title>
+			<para>The functions given below are PostGIS functions that do not throw away the Z-Index.</para>
+				<itemizedlist>
+			<!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
+				<xsl:for-each select='sect1/refentry'>
+					<xsl:sort select="@id"/>
+					<xsl:variable name='comment'>
+						<xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
+					</xsl:variable>
+					<xsl:variable name="refid">
+						<xsl:value-of select="@id" />
+					</xsl:variable>
+				
+			<!-- For each section if there is note that it supports 3d catalog it -->
+						<xsl:for-each select="refsection">
+							<xsl:for-each select="para">
+								<xsl:choose>
+									<xsl:when test="contains(.,'This function supports 3d')">
+										<listitem><link linkend="{$refid}"><xsl:value-of select="$refid" /></link> - <xsl:value-of select="$comment" /></listitem>
+									</xsl:when>
+								</xsl:choose>
+							</xsl:for-each>
+						</xsl:for-each>
+				</xsl:for-each>
+				</itemizedlist>
+		</sect1>
 	</chapter>
 	</xsl:template>
 



More information about the postgis-commits mailing list