]> granicus.if.org Git - postgis/commitdiff
more changes
authorRegina Obe <lr@pcorp.us>
Mon, 5 Apr 2010 01:32:30 +0000 (01:32 +0000)
committerRegina Obe <lr@pcorp.us>
Mon, 5 Apr 2010 01:32:30 +0000 (01:32 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5484 b70326c6-7e19-0410-871a-916f4a2858ee

doc/postgis.xml
doc/reference_wktraster.xml

index 522b1fbbee8cffe038fe8e57cdf9c7da032c4827..3396907bd9edb535b9ac675b07a01e612ab29ec9 100644 (file)
@@ -32,6 +32,7 @@
 <!ENTITY reference_transaction SYSTEM "reference_transaction.xml">
 <!ENTITY reference_misc SYSTEM "reference_misc.xml">
 <!ENTITY reference_exception SYSTEM "reference_exception.xml">
+<!ENTITY reference_wktraster SYSTEM "reference_wktraster.xml">
 
 <!ENTITY sfs_compliant 
 "<inlinemediaobject>
   &performance_tips;
   &reference;
   &postgis_aggs_mm;
+  &reference_wktraster;
   &reporting;
   &release_notes;
 
index 6acfe8c485d804e1cf8aa885aaf0993665ddf386..a97cfdd7f5ca75badc6dec6e891dc084f0d56ed9 100644 (file)
   In order to use these functions, you need PostGIS 1.4 above installed in your database as well as wktraster compiled and the rtpostgis.sql loaded in your database.  
   This will change later once the two projects are fully integrated.</para>
   <para>For more information about WKT Raster, please refer to <ulink url="http://trac.osgeo.org/postgis/wiki/WKTRaster">PostGIS WKT Raster Home Page</ulink>.</para>
-  <sect1 id="Raster_Outputs">
-         <title>Raster Outputs</title>
-                 <refentry id="RT_ST_AsBinary">
-                 <refnamediv>
-                       <refname>ST_AsBinary</refname>
-                       <refpurpose>Return the Well-Known Binary (WKB) representation of the raster without SRID meta data.</refpurpose>
-                 </refnamediv>
-
-                 <refsynopsisdiv>
-                       <funcsynopsis>
-                         <funcprototype>
-                               <funcdef>bytea <function>ST_AsBinary</function></funcdef>
-                               <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
-                         </funcprototype>
-                       </funcsynopsis>
-                 </refsynopsisdiv>
-
-                 <refsection>
-                       <title>Description</title>
-
-                       <para>Returns the Binary representation of the raster.  There are 2 variants of the function.  The first
-                       variant takes no endian encoding paramater and defaults to little endian.  The second variant takes a second argument
-                       denoting the encoding - using little-endian ('NDR') or big-endian ('XDR') encoding.</para>
-                       <para>This is useful in binary cursors to pull data out of the
-                       database without converting it to a string representation.</para>
-                 </refsection>
+  <para>For the examples in this reference we will be using a raster table of dummy rasters - Formed with the following code </para>
+  <programlisting>
+CREATE TABLE dummy_rast(rast raster);
+INSERT INTO dummy_rast(rast)
+VALUES(
+('01' -- little endian (uint8 ndr)
+|| 
+'0000' -- version (uint16 0)
+||
+'0000' -- nBands (uint16 0)
+||
+'0000000000000040' -- scaleX (float64 2)
+||
+'0000000000000840' -- scaleY (float64 3)
+||
+'000000000000E03F' -- ipX (float64 0.5)
+||
+'000000000000E03F' -- ipY (float64 0.5)
+||
+'0000000000000000' -- skewX (float64 0)
+||
+'0000000000000000' -- skewY (float64 0)
+||
+'0A000000' -- SRID (int32 10)
+||
+'0A00' -- width (uint16 10)
+||
+'1400' -- height (uint16 20)
+)::raster
+);
+  </programlisting>
+  
+       <sect1 id="Raster_Accessors">
+               <title>Raster Accessorts</title>
+               <refentry id="RT_ST_Height">
+                       <refnamediv>
+                               <refname>ST_Height</refname>
+                               <refpurpose>Returns the height of the raster in pixels?</refpurpose>
+                       </refnamediv>
+               
+                       <refsynopsisdiv>
+                               <funcsynopsis>
+                                 <funcprototype>
+                                       <funcdef>integer <function>ST_Height</function></funcdef>
+                                       <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
+                                 </funcprototype>
+                               </funcsynopsis>
+                       </refsynopsisdiv>
+               
+                       <refsection>
+                               <title>Description</title>
+                               
+                               <para>Returns the height of the raster.</para>
+                               </refsection>
+                               
+                               <refsection>
+                                       <title>Examples</title>
+                               
+                                       <programlisting>SELECT ST_Height(rast) As rastheight
+FROM dummy_rast LIMIT 1;
 
-                 <refsection>
-                       <title>Examples</title>
+rastheight
+----------------
+20
+                               </programlisting>
+                       
+                       </refsection>
+               
+                       <!-- Optionally add a "See Also" section -->
+                       <refsection>
+                               <title>See Also</title>
+                               <para><xref linkend="RT_ST_Width" /></para>
+                       </refsection>
+               </refentry>
+               <refentry id="RT_ST_Width">
+                       <refnamediv>
+                               <refname>ST_Width</refname>
+                               <refpurpose>Returns the width of the raster in pixels?</refpurpose>
+                       </refnamediv>
+               
+                       <refsynopsisdiv>
+                               <funcsynopsis>
+                                 <funcprototype>
+                                       <funcdef>integer <function>ST_Width</function></funcdef>
+                                       <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
+                                 </funcprototype>
+                               </funcsynopsis>
+                       </refsynopsisdiv>
+               
+                       <refsection>
+                               <title>Description</title>
+                               
+                               <para>Returns the width of the raster.</para>
+                               </refsection>
+                               
+                               <refsection>
+                                       <title>Examples</title>
+                               
+                                       <programlisting>SELECT ST_Width(rast) As rastwidth
+FROM dummy_rast LIMIT 1;
 
-                       <programlisting>CREATE TABLE dummy_rast(rast raster);
+rastwidth
+----------------
+10
+                               </programlisting>
+                       
+                       </refsection>
+               
+                       <!-- Optionally add a "See Also" section -->
+                       <refsection>
+                               <title>See Also</title>
+                               <para><xref linkend="RT_ST_Height" /></para>
+                       </refsection>
+               </refentry>
+       </sect1>
+       
+       <sect1 id="Raster_Outputs">
+               <title>Raster Outputs</title>
+               <refentry id="RT_ST_AsBinary">
+                       <refnamediv>
+                               <refname>ST_AsBinary</refname>
+                               <refpurpose>Return the Well-Known Binary (WKB) representation of the raster without SRID meta data.</refpurpose>
+                       </refnamediv>
+               
+                       <refsynopsisdiv>
+                               <funcsynopsis>
+                                 <funcprototype>
+                                       <funcdef>bytea <function>ST_AsBinary</function></funcdef>
+                                       <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
+                                 </funcprototype>
+                               </funcsynopsis>
+                       </refsynopsisdiv>
+               
+                       <refsection>
+                               <title>Description</title>
+                               
+                               <para>Returns the Binary representation of the raster.  There are 2 variants of the function.  The first
+                               variant takes no endian encoding paramater and defaults to little endian.  The second variant takes a second argument
+                               denoting the encoding - using little-endian ('NDR') or big-endian ('XDR') encoding.</para>
+                               <para>This is useful in binary cursors to pull data out of the
+                               database without converting it to a string representation.</para>
+                               </refsection>
+                               
+                               <refsection>
+                                       <title>Examples</title>
+                               
+                                       <programlisting>CREATE TABLE dummy_rast(rast raster);
 INSERT INTO dummy_rast(rast)
 VALUES(
 ('01' -- little endian (uint8 ndr)
@@ -69,22 +185,22 @@ VALUES(
 )::raster
 );                     
 SELECT ST_AsBinary(rast) As rastbin
- FROM dummy_rast LIMIT 1;
-                                 rastbin
+FROM dummy_rast LIMIT 1;
+
+                                        rastbin
 ---------------------------------------------------------------------------------
- \001\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\010@\
+\001\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\010@\
 000\000\000\000\000\000\340?\000\000\000\000\000\000\340?\000\000\000\000\000\00
 0\000\000\000\000\000\000\000\000\000\000\012\000\000\000\012\000\024\000 
-</programlisting>
+                               </programlisting>
                        
-                 </refsection>
-
-                 <!-- Optionally add a "See Also" section -->
-                 <refsection>
-                       <title>See Also</title>
-                       <para></para>
-                 </refsection>
-       </refentry>
- </sect1>
+                       </refsection>
+               
+                       <!-- Optionally add a "See Also" section -->
+                       <refsection>
+                               <title>See Also</title>
+                               <para></para>
+                       </refsection>
+               </refentry>
      </sect1>
 </chapter>