]> granicus.if.org Git - postgis/commitdiff
First start at integrating wktraster documentation -- hopefully didn't break anything...
authorRegina Obe <lr@pcorp.us>
Mon, 5 Apr 2010 01:05:46 +0000 (01:05 +0000)
committerRegina Obe <lr@pcorp.us>
Mon, 5 Apr 2010 01:05:46 +0000 (01:05 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5483 b70326c6-7e19-0410-871a-916f4a2858ee

doc/Makefile.in
doc/reference_wktraster.xml [new file with mode: 0644]

index 2eea2a7a799c63b9c6dd11db454bc1a74d0cefed..c5f3eac196429ce1a0ebbe93c1a092978ee42a56 100644 (file)
@@ -67,7 +67,7 @@ postgis_aggs_mm.xml: ./xsl/postgis_aggs_mm.xml.xsl postgis.xml
 postgis_comments.sql: ./xsl/postgis_comments.sql.xsl postgis.xml postgis_aggs_mm.xml
        $(XSLTPROC) ./xsl/postgis_comments.sql.xsl postgis.xml > $@
 
-postgis-out.xml: postgis.xml introduction.xml installation.xml faq.xml using_postgis_dataman.xml  using_postgis_app.xml performance_tips.xml reference.xml reference_management.xml reference_constructor.xml reference_accessor.xml reference_editor.xml reference_output.xml reference_operator.xml reference_measure.xml reference_processing.xml reference_lrs.xml reference_transaction.xml reference_misc.xml reference_exception.xml postgis_aggs_mm.xml reporting.xml release_notes.xml ../Version.config
+postgis-out.xml: postgis.xml introduction.xml installation.xml faq.xml using_postgis_dataman.xml  using_postgis_app.xml performance_tips.xml reference.xml reference_management.xml reference_constructor.xml reference_accessor.xml reference_editor.xml reference_output.xml reference_operator.xml reference_measure.xml reference_processing.xml reference_lrs.xml reference_transaction.xml reference_misc.xml reference_exception.xml postgis_aggs_mm.xml reference_wktraster.xml reporting.xml release_notes.xml ../Version.config
        cat $< | sed "s/@@LAST_RELEASE_VERSION@@/${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}/g" > $@
 
 chunked-html: postgis-out.xml images
diff --git a/doc/reference_wktraster.xml b/doc/reference_wktraster.xml
new file mode 100644 (file)
index 0000000..6acfe8c
--- /dev/null
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="RT_reference">
+  <title>WKT Raster Reference</title>
+
+  <para>The functions given below are the ones which a user of WKT Raster is
+  likely to need and which are currently available in WKT Raster. There are other functions which are required support
+  functions to the raster objects which are not of use to a general
+  user.</para>
+  <para>WKT Raster is a sub-project of PostGIS that introduces a new type called <varname>raster</varname> for storing and analyzing raster data.
+  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>
+
+                 <refsection>
+                       <title>Examples</title>
+
+                       <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
+);                     
+SELECT ST_AsBinary(rast) As 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@\
+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>
+                       
+                 </refsection>
+
+                 <!-- Optionally add a "See Also" section -->
+                 <refsection>
+                       <title>See Also</title>
+                       <para></para>
+                 </refsection>
+       </refentry>
+ </sect1>
+</chapter>