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

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Sun Nov 16 16:52:57 PST 2008


Author: robe
Date: 2008-11-16 16:52:56 -0800 (Sun, 16 Nov 2008)
New Revision: 3298

Modified:
   trunk/doc/reference.xml
   trunk/doc/reference_new.xml
Log:
st_mem_size

Modified: trunk/doc/reference.xml
===================================================================
--- trunk/doc/reference.xml	2008-11-17 00:09:42 UTC (rev 3297)
+++ trunk/doc/reference.xml	2008-11-17 00:52:56 UTC (rev 3298)
@@ -571,15 +571,6 @@
           </listitem>
         </varlistentry>
 
-        <varlistentry>
-          <term>ST_mem_size(geometry)</term>
-
-          <listitem>
-            <para>Returns the amount of space (in bytes) the geometry
-            takes.</para>
-          </listitem>
-        </varlistentry>
-
         <varlistentry id="ST_Point_Inside_Circle">
           <term>ST_point_inside_circle(geometry, float, float, float)</term>
 

Modified: trunk/doc/reference_new.xml
===================================================================
--- trunk/doc/reference_new.xml	2008-11-17 00:09:42 UTC (rev 3297)
+++ trunk/doc/reference_new.xml	2008-11-17 00:52:56 UTC (rev 3298)
@@ -10389,7 +10389,7 @@
   </sect1>
   
   <sect1 id="Miscellaneous_Functions">
-    <title>Misc</title>
+    <title>Miscellaneous Functions</title>
 
 	<refentry id="ST_Accum">
 	  <refnamediv>
@@ -10608,6 +10608,78 @@
         <para><xref linkend="ST_AsEWKT" />, <xref linkend="ST_SetSRID" />, <xref linkend="ST_SRID" /></para>
       </refsection>
 	</refentry>
+	
+	        <varlistentry>
+          <term>ST_mem_size(geometry)</term>
+
+          <listitem>
+            <para>Returns the amount of space (in bytes) the geometry
+            takes.</para>
+          </listitem>
+        </varlistentry>
+	<refentry id="ST_MemSize">
+	  <refnamediv>
+	    <refname>ST_MemSize</refname>
+	
+	    <refpurpose>Returns the amount of space (in bytes) the geometry takes.</refpurpose>
+	  </refnamediv>
+	
+	  <refsynopsisdiv>
+	    <funcsynopsis>
+	      <funcprototype>
+	        <funcdef>integer <function>ST_MemSize</function></funcdef>
+	        <paramdef><type>geometry </type> <parameter>geomA</parameter></paramdef>
+	      </funcprototype>
+	    </funcsynopsis>
+	  </refsynopsisdiv>
+	
+	  <refsection>
+	    <title>Description</title>
+	
+	    <para>Returns the amount of space (in bytes) the geometry takes. </para>
+		<para>This is a nice compliment to PostgreSQL built in functions pg_size_pretty, pg_relation_size.</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>
+	<!-- Optionally mention Circular String Support -->
+		    <para><inlinemediaobject>
+		        <imageobject>
+		          <imagedata fileref="images/check.png" />
+		        </imageobject>
+		      </inlinemediaobject> This method supports Circular Strings and curves </para>
+	  </refsection>
+	  
+	
+	  <refsection>
+	    <title>Examples</title>
+	
+	    <programlisting>
+--Return how much byte space Boston takes up  in our Mass data set
+SELECT pg_size_pretty(SUM(st_mem_size(the_geom))) as totgeomsum, 
+pg_size_pretty(SUM(CASE WHEN town = 'BOSTON' THEN st_mem_size(the_geom) ELSE 0 END)) As bossum, 
+CAST(SUM(CASE WHEN town = 'BOSTON' THEN st_mem_size(the_geom) ELSE 0 END)*1.00 /
+		SUM(st_mem_size(the_geom))*100 As numeric(10,2)) As perbos
+FROM towns;
+
+totgeomsum	bossum	perbos
+----------	------	------
+1522 kB		30 kB	1.99
+	
+	</programlisting>
+	  </refsection>
+	
+	  <!-- Optionally add a "See Also" section -->
+	  <refsection>
+	    <title>See Also</title>
+	
+	    <para></para>
+	  </refsection>
+	</refentry>
  </sect1>
       
 </chapter>



More information about the postgis-commits mailing list