Changes between Version 50 and Version 51 of WKTRaster/SpecificationWorking03


Ignore:
Timestamp:
Apr 6, 2011, 7:41:33 AM (13 years ago)
Author:
Bborie Park
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • WKTRaster/SpecificationWorking03

    v50 v51  
    4848    nbands is an array of 1-based band indices of the bands to copy into the output raster
    4949
    50     Ex: For a raster rast with 3 bands:
    51 
    52         ST_Band(rast, ARRAY[1,3,2])
    53 
    54         ST_Band(rast, ARRAY[3,2,1])
    55 
    56         You can rearrange the bands as above. You can also duplicate the bands:
    57 
    58         ST_Band(rast, ARRAY[1,2,3,2,1])
     50    For a raster rast with 3 bands:
     51{{{
     52ST_Band(rast, ARRAY[1,3,2])
     53
     54ST_Band(rast, ARRAY[3,2,1])
     55}}}
     56    You can rearrange the bands as above. You can also duplicate the bands:
     57{{{
     58ST_Band(rast, ARRAY[1,2,3,2,1])
     59}}}
    5960
    6061ST_Band(rast raster, nband int) -> raster
     
    6263    nband is a single integer of the 1-based band index of the band to copy into the output raster
    6364
    64     Ex: ST_Band(rast, 1)
    65 
    66         ST_Band(rast, 3)
     65{{{
     66ST_Band(rast, 1)
     67
     68ST_Band(rast, 3)
     69}}}
    6770
    6871ST_Band(rast raster, nbands text) -> raster
     
    7073    nbands is a comma separated string of 1-based band indices indicating the bands to copy into the output raster
    7174
    72     Ex: ST_Band(rast, '1,2')
    73 
    74         ST_Band(rast, '1,2,3, 1, 1 , 2')
     75{{{
     76ST_Band(rast, '1,2')
     77
     78ST_Band(rast, '1,2,3, 1, 1 , 2')
     79}}}
    7580
    7681ST_Band(rast raster) -> raster
     
    7883    the band to extract is automatically assumed to be one.
    7984
    80     Ex: ST_Band(rast)
     85{{{
     86ST_Band(rast)
     87}}}
    8188
    8289If an index is outside the valid range of band indices for a raster (less than 1 or greater than the value returned by ST_NumBands), the function will fail and return.
     
    198205  srs: the user-specified OGC WKT or the proj4 text for a spatial reference to embed in the GDAL raster.  Not all formats support embedding this information.  e.g. the non-empty value for the srtext or proj4text column from the spatial_ref_sys table.
    199206
    200   Ex: ST_AsGDALRaster(rast, 'GTiff', ARRAY['COMPRESS=JPEG', 'JPEG_QUALITY=90'], '+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs')
    201 
    202       ST_AsGDALRaster(rast, 'GTiff', ARRAY['COMPRESS=JPEG', 'JPEG_QUALITY=90'], 'PROJCS["NAD83 / California Albers",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",34],PARAMETER["standard_parallel_2",40.5],PARAMETER["latitude_of_center",0],PARAMETER["longitude_of_center",-120],PARAMETER["false_easting",0],PARAMETER["false_northing",-4000000],AUTHORITY["EPSG","3310"],AXIS["X",EAST],AXIS["Y",NORTH]]')
     207{{{
     208ST_AsGDALRaster(rast, 'GTiff', ARRAY['COMPRESS=JPEG', 'JPEG_QUALITY=90'], '+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs')
     209
     210ST_AsGDALRaster(rast, 'GTiff', ARRAY['COMPRESS=JPEG', 'JPEG_QUALITY=90'], 'PROJCS["NAD83 / California Albers",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",34],PARAMETER["standard_parallel_2",40.5],PARAMETER["latitude_of_center",0],PARAMETER["longitude_of_center",-120],PARAMETER["false_easting",0],PARAMETER["false_northing",-4000000],AUTHORITY["EPSG","3310"],AXIS["X",EAST],AXIS["Y",NORTH]]')
     211}}}
     212
    203213
    204214ST_AsGDALRaster(rast raster, format text, options text[]) -> bytea
     
    206216  This one removes the user-specified srs argument.  The output GDAL raster's spatial reference will be set to the same as the input raster, if possible.
    207217
    208   Ex: ST_AsGDALRaster(rast, 'JPEG', ARRAY['QUALITY=50'])
    209 
    210       ST_AsGDALRaster(rast, 'PNG', ARRAY['ZLEVEL=7'])
     218{{{
     219ST_AsGDALRaster(rast, 'JPEG', ARRAY!['QUALITY=50'])
     220
     221ST_AsGDALRaster(rast, 'PNG', ARRAY!['ZLEVEL=7'])
     222}}}
    211223
    212224ST_AsGDALRaster(rast raster, format text) -> bytea
    213225
    214226  The simplest implementation of this function.  Since the options argument has been removed, the output GDAL raster will be created with default options.  Like the prior function, the spatial reference of the GDAL raster will be set to the same as the input raster.
     227
     228{{{
     229ST_AsGDALRaster(rast, 'JPEG')
     230}}}
    215231
    216232ST_AsGDALRaster and other format specific functions (ST_AsJPEG, ST_AsTIFF and ST_AsPNG) are all wrappers around the function