From 350262076785c584ef019c2265c94339607eecbd Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Mon, 5 Apr 2010 01:05:46 +0000 Subject: [PATCH] First start at integrating wktraster documentation -- hopefully didn't break anything doing this. git-svn-id: http://svn.osgeo.org/postgis/trunk@5483 b70326c6-7e19-0410-871a-916f4a2858ee --- doc/Makefile.in | 2 +- doc/reference_wktraster.xml | 90 +++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 doc/reference_wktraster.xml diff --git a/doc/Makefile.in b/doc/Makefile.in index 2eea2a7a7..c5f3eac19 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -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 index 000000000..6acfe8c48 --- /dev/null +++ b/doc/reference_wktraster.xml @@ -0,0 +1,90 @@ + + + WKT Raster Reference + + 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. + WKT Raster is a sub-project of PostGIS that introduces a new type called raster 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. + For more information about WKT Raster, please refer to PostGIS WKT Raster Home Page. + + Raster Outputs + + + ST_AsBinary + Return the Well-Known Binary (WKB) representation of the raster without SRID meta data. + + + + + + bytea ST_AsBinary + raster rast + + + + + + Description + + 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. + This is useful in binary cursors to pull data out of the + database without converting it to a string representation. + + + + Examples + + 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 + + + + + + + See Also + + + + + -- 2.40.0