From 6dc488ef6330acf5b95dc21c7abaca1e9a9fcb3a Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Mon, 5 Apr 2010 01:32:30 +0000 Subject: [PATCH] more changes git-svn-id: http://svn.osgeo.org/postgis/trunk@5484 b70326c6-7e19-0410-871a-916f4a2858ee --- doc/postgis.xml | 2 + doc/reference_wktraster.xml | 202 ++++++++++++++++++++++++++++-------- 2 files changed, 161 insertions(+), 43 deletions(-) diff --git a/doc/postgis.xml b/doc/postgis.xml index 522b1fbbe..3396907bd 100644 --- a/doc/postgis.xml +++ b/doc/postgis.xml @@ -32,6 +32,7 @@ + @@ -106,6 +107,7 @@ &performance_tips; &reference; &postgis_aggs_mm; + &reference_wktraster; &reporting; &release_notes; diff --git a/doc/reference_wktraster.xml b/doc/reference_wktraster.xml index 6acfe8c48..a97cfdd7f 100644 --- a/doc/reference_wktraster.xml +++ b/doc/reference_wktraster.xml @@ -10,37 +10,153 @@ 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. - + For the examples in this reference we will be using a raster table of dummy rasters - Formed with the following code + +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 +); + + + + Raster Accessorts + + + ST_Height + Returns the height of the raster in pixels? + + + + + + integer ST_Height + raster rast + + + + + + Description + + Returns the height of the raster. + + + + Examples + + SELECT ST_Height(rast) As rastheight +FROM dummy_rast LIMIT 1; - - Examples +rastheight +---------------- +20 + + + + + + + See Also + + + + + + ST_Width + Returns the width of the raster in pixels? + + + + + + integer ST_Width + raster rast + + + + + + Description + + Returns the width of the raster. + + + + Examples + + SELECT ST_Width(rast) As rastwidth +FROM dummy_rast LIMIT 1; - CREATE TABLE dummy_rast(rast raster); +rastwidth +---------------- +10 + + + + + + + See Also + + + + + + + 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) @@ -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 - + - - - - - See Also - - - - + + + + + See Also + + + + -- 2.40.0