From: Regina Obe Date: Mon, 5 Apr 2010 04:30:44 +0000 (+0000) Subject: more functions documented X-Git-Tag: 2.0.0alpha1~3076 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=77d5ed4a9183fef9f328715c22f02d1e9bd338cd;p=postgis more functions documented git-svn-id: http://svn.osgeo.org/postgis/trunk@5486 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference_wktraster.xml b/doc/reference_wktraster.xml index b9baa779e..061690b0a 100644 --- a/doc/reference_wktraster.xml +++ b/doc/reference_wktraster.xml @@ -14,7 +14,7 @@ CREATE TABLE dummy_rast(rid integer, rast raster); INSERT INTO dummy_rast(rid, rast) -VALUES(1, +VALUES (1, ('01' -- little endian (uint8 ndr) || '0000' -- version (uint16 0) @@ -39,22 +39,27 @@ VALUES(1, || '1400' -- height (uint16 20) )::raster -); +), +-- Raster: 5 x 5 pixels, 3 bands, PT_8BUI pixel type, NODATA = 0 +(2, ('01000003009A9999999999A93F9A9999999999A9BF000000E02B274A' || +'41000000007719564100000000000000000000000000000000FFFFFFFF050005000400FDFEFDFEFEFDFEFEFDF9FAFEF' || +'EFCF9FBFDFEFEFDFCFAFEFEFE04004E627AADD16076B4F9FE6370A9F5FE59637AB0E54F58617087040046566487A1506CA2E3FA5A6CAFFBFE4D566DA4CB3E454C5665')::raster); Raster Accessors - + - ST_Height - Returns the height of the raster in pixels? + ST_BandNoDataValue + Returns the value in a given band that represents no data. - integer ST_Height + integer ST_BandNoDataValue raster rast + integer bandnum @@ -62,40 +67,82 @@ VALUES(1, Description - Returns the height of the raster. + Returns the value that represents no data for the band Examples - SELECT ST_Height(rast) As rastheight -FROM dummy_rast WHERE rid=1; - -rastheight ----------------- -20 + + + + See Also + + + - + + + ST_BandPixelType + Returns the type of pixel for given band. + + + + + + integer ST_BandNoDataValue + raster rast + integer bandnum + + + + + + Description + + Returns the value that represents no data for the band + + + + Examples + + SELECT ST_BandPixelType(rast,1) As btype1, + ST_BandPixelType(rast,2) As btype2, ST_BandPixelType(rast,3) As btype3 +FROM dummy_rast +WHERE rid = 2; + + btype1 | btype2 | btype3 +--------+--------+-------- + 8BUI | 8BUI | 8BUI + + + + See Also - + - + - ST_NumBands - Returns the number of bands in the raster object. + ST_GeoReference + Returns the georeference meta data in GDAL or ESRI format. Default is GDAL. - integer ST_NumBands + text ST_GeoReference + raster rast + + + text ST_GeoReference raster rast + text format @@ -103,38 +150,57 @@ rastheight Description - Returns the number of bands in the raster object. + Returns the georeference meta data in GDAL or ESRI format. Default is GDAL if no type specified. type is string 'GDAL' or 'ESRI'. + Difference between format representations is as follows: + GDAL: +pixelsizex +skewy +skewx +pixelsizey +upperleftx +upperlefty + ESRI: +pixelsizex +skewy +skewx +pixelsizey +upperleftx + pixelsizex*0.5 +upperleftx + pixelsizey*0.5 Examples - SELECT ST_NumBands(rast) As numbands -FROM dummy_rast WHERE rid=1; + SELECT ST_GeoReference(rast, 'ESRI') As esri_ref, ST_GeoReference(rast, 'GDAL') As gdal_ref + FROM dummy_rast WHERE rid=1; -numbands ----------------- -0 + esri_ref | gdal_ref +--------------+-------------- + 2.0000000000 | 2.0000000000 + 0.0000000000 : 0.0000000000 + 0.0000000000 : 0.0000000000 + 3.0000000000 : 3.0000000000 + 1.5000000000 : 0.5000000000 + 2.0000000000 : 0.5000000000 - - + See Also - + , - + - ST_PixelSizeX - Returns the x size of pixels in units of coordinate reference system? + ST_Height + Returns the height of the raster in pixels? - float8 ST_PixelSizeX + integer ST_Height raster rast @@ -143,39 +209,80 @@ numbands Description - Returns the x size of pixels in units of coordinate reference system? + Returns the height of the raster. Examples - SELECT ST_PixelSizeX(rast) As rastpixwidth -FROM dummy_rast WHERE rid=1; + SELECT rid, ST_Height(rast) As rastheight +FROM dummy_rast; -rastpixwidth ----------------- -2 + rid | rastheight +-----+------------ + 1 | 20 + 2 | 5 + + + See Also + + + + + + + ST_NumBands + Returns the number of bands in the raster object. + + + + + + integer ST_NumBands + raster rast + + + + + + Description + + Returns the number of bands in the raster object. + + + + Examples + + SELECT rid, ST_NumBands(rast) As numbands +FROM dummy_rast; + +rid | numbands +----+---------- + 1 | 0 + 2 | 3 + + See Also - + - + - ST_PixelSizeY - Returns the y size of pixels in units of coordinate reference system? + ST_PixelSizeX + Returns the x size of pixels in units of coordinate reference system? - float8 ST_PixelSizeY + float8 ST_PixelSizeX raster rast @@ -184,18 +291,19 @@ rastpixwidth Description - Returns the y size of pixels in units of coordinate reference system? + Returns the x size of pixels in units of coordinate reference system? Examples - SELECT ST_PixelSizeY(rast) As rastpixheight -FROM dummy_rast WHERE rid=1; + SELECT rid, ST_PixelSizeX(rast) As rastpixwidth +FROM dummy_rast; -rastpixheight ----------------- -3 + rid | rastpixwidth +-----+-------------- + 1 | 2 + 2 | 0.05 @@ -203,20 +311,20 @@ rastpixheight See Also - + - + - ST_Width - Returns the width of the raster in pixels? + ST_PixelSizeY + Returns the y size of pixels in units of coordinate reference system? - integer ST_Width + float8 ST_PixelSizeY raster rast @@ -225,18 +333,19 @@ rastpixheight Description - Returns the width of the raster. + Returns the y size of pixels in units of coordinate reference system? Examples - SELECT ST_Width(rast) As rastwidth -FROM dummy_rast WHERE rid=1; + SELECT rid, ST_PixelSizeY(rast) As rastpixheight +FROM dummy_rast; -rastwidth ----------------- -10 + rid | rastpixheight +-----+--------------- + 1 | 3 + 2 | -0.05 --this might be a bug @@ -327,6 +436,47 @@ srid + + + + 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 WHERE rid=1; + +rastwidth +---------------- +10 + + + + + + + See Also + + +