]> granicus.if.org Git - postgis/commitdiff
First attempt at super-duper type functionality compare matrix
authorRegina Obe <lr@pcorp.us>
Tue, 1 Dec 2009 14:15:28 +0000 (14:15 +0000)
committerRegina Obe <lr@pcorp.us>
Tue, 1 Dec 2009 14:15:28 +0000 (14:15 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@4952 b70326c6-7e19-0410-871a-916f4a2858ee

doc/xsl/postgis_aggs_mm.xml.xsl

index 902d8b54b56366251f415d8cab0625c1304c0a5e..77a4528dde88aeb9c0928b83101f908fe8c65f85 100644 (file)
                                </itemizedlist>\r
                </sect1>\r
 \r
+               <sect1 id="PostGIS_TypeFunctionMatrix">\r
+                       <title>PostGIS Type Function Matrix</title>\r
+                       <sect1info>\r
+                               <abstract>\r
+                                       <para>Below is an alphabetical listing of all functions in PostGIS and the kinds of spatial\r
+                                               types they work with.</para>\r
+                                       <para>An + means the function works with it natively.  A T means it does but has a transform cast built-in to \r
+                                               do the work so not native. A * means the function works with it, but only does because of auto-casting\r
+                                                       behavior.</para>\r
+                               </abstract>\r
+                       </sect1info>\r
+                       <table frame='all'><title>Function Type Support Matrix</title>\r
+                       <tgroup cols='5' align='left' colsep='1' rowsep='1'>\r
+                               <colspec colname='function'/>\r
+                               <colspec colname='geometry'/>\r
+                               <colspec colname='geography'/>\r
+                               <colspec colname='3D'/>\r
+                               <colspec colname='Curves'/>\r
+                       <thead>\r
+                               <row>\r
+                                 <entry>Function</entry>\r
+                                 <entry>geometry</entry>\r
+                                 <entry>geography</entry>\r
+                                 <entry>3D (2.5D)</entry>\r
+                                 <entry>Curves</entry>\r
+                               </row>\r
+                       </thead>\r
+                       <tbody>\r
+                       <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->\r
+                       <xsl:for-each select='sect1/refentry'>\r
+                               <xsl:sort select="@id"/>\r
+                               <xsl:variable name='comment'>\r
+                                       <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>\r
+                               </xsl:variable>\r
+                               <xsl:variable name="refid">\r
+                                       <xsl:value-of select="@id" />\r
+                               </xsl:variable>\r
+                               <xsl:variable name="refname">\r
+                                       <xsl:value-of select="refnamediv/refname" />\r
+                               </xsl:variable>\r
 \r
+                               <row>\r
+                                       <!-- Display name of function and link to it -->\r
+                                       <entry><link linkend="{$refid}"><xsl:value-of select="$refname" /></link></entry>\r
+                                       <!-- If at least one proto function accepts or returns a geometry -->\r
+                                       <xsl:choose>\r
+                                               <!-- direct support -->\r
+                                               <xsl:when test="contains(refsynopsisdiv/funcsynopsis,'geometry') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geometry')">\r
+                                                       <entry>+</entry>\r
+                                               </xsl:when>\r
+                                               <!-- support via autocast -->\r
+                                               <xsl:when test="contains(refsynopsisdiv/funcsynopsis,'box') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'box')">\r
+                                                       <entry>*</entry>\r
+                                               </xsl:when>\r
+                                               <!-- no support -->\r
+                                               <xsl:otherwise>\r
+                                                       <entry></entry>\r
+                                               </xsl:otherwise>\r
+                                       </xsl:choose>\r
+                                       <!-- If at least one proto function accepts or returns a geography -->\r
+                                       <xsl:choose>\r
+                                               <!-- Support via geometry transform hack -->\r
+                                               <xsl:when test="(contains(refsynopsisdiv/funcsynopsis,'geography') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geography')) and contains($comment,'(T)')">\r
+                                                       <entry>T</entry>\r
+                                               </xsl:when>\r
+                                               <!-- direct support -->\r
+                                               <xsl:when test="contains(refsynopsisdiv/funcsynopsis,'geography') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geography')">\r
+                                                       <entry>+</entry>\r
+                                               </xsl:when>\r
+                                               <!-- no support -->\r
+                                               <xsl:otherwise>\r
+                                                       <entry></entry>\r
+                                               </xsl:otherwise>\r
+                                       </xsl:choose>\r
+                                       \r
+                                       <!-- If at least one paragraph contains support 3d -->\r
+                                       <xsl:choose>\r
+                                               <!-- supports -->\r
+                                               <xsl:when test="contains(refsection/para,'This function supports 3d') ">\r
+                                                       <entry>+</entry>\r
+                                               </xsl:when>\r
+                                               <!-- no support -->\r
+                                               <xsl:otherwise>\r
+                                                       <entry></entry>\r
+                                               </xsl:otherwise>\r
+                                       </xsl:choose>\r
+                                       <!-- Support for Curve -->\r
+                                       <xsl:choose>\r
+                                               <!-- supports -->\r
+                                               <xsl:when test="contains(refsection/para,'supports Circular Strings') ">\r
+                                                       <entry>+</entry>\r
+                                               </xsl:when>\r
+                                               <!-- no support -->\r
+                                               <xsl:otherwise>\r
+                                                       <entry></entry>\r
+                                               </xsl:otherwise>\r
+                                       </xsl:choose>   \r
+                               </row>\r
+                       </xsl:for-each>\r
+                       </tbody>\r
+               </tgroup>\r
+               </table>\r
+                               \r
+                       <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->\r
+                               <xsl:for-each select='sect1/refentry'>\r
+                                       <xsl:sort select="@id"/>\r
+                                       <xsl:variable name='comment'>\r
+                                               <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>\r
+                                       </xsl:variable>\r
+                                       <xsl:variable name="refid">\r
+                                               <xsl:value-of select="@id" />\r
+                                       </xsl:variable>\r
+                                       <xsl:variable name="refname">\r
+                                               <xsl:value-of select="refnamediv/refname" />\r
+                                       </xsl:variable>\r
+\r
+                       <!-- If at least one proto function accepts or returns a geography -->\r
+                                       <xsl:choose>\r
+                                               <xsl:when test="contains(refsynopsisdiv/funcsynopsis,'geometry_dump') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geometry_dump')">\r
+                                                       <listitem><link linkend="{$refid}"><xsl:value-of select="$refname" /></link> - <xsl:value-of select="$comment" /></listitem>\r
+                                               </xsl:when>\r
+                                       </xsl:choose>\r
+                               </xsl:for-each>\r
+                               \r
+               </sect1>\r
 \r
                <sect1 id="NewFunctions">\r
                        <title>New PostGIS Functions</title>\r