Changes between Version 62 and Version 63 of WKTRaster/SpecificationWorking03


Ignore:
Timestamp:
Apr 15, 2011, 8:35:13 AM (13 years ago)
Author:
Bborie Park
Comment:

added numbering for functions in FV.01

Legend:

Unmodified
Added
Removed
Modified
  • WKTRaster/SpecificationWorking03

    v62 v63  
    4444Bborie: A complete implementation of ST_Band should include the following:
    4545
    46 ST_Band(rast raster, nbands int[]) -> raster
     461. ST_Band(rast raster, nbands int[]) -> raster
    4747
    4848    nbands is an array of 1-based band indices of the bands to copy into the output raster
     
    5959}}}
    6060
    61 ST_Band(rast raster, nband int) -> raster
     612. ST_Band(rast raster, nband int) -> raster
    6262
    6363    nband is a single integer of the 1-based band index of the band to copy into the output raster
     
    6969}}}
    7070
    71 ST_Band(rast raster, nbands text) -> raster
     713. ST_Band(rast raster, nbands text) -> raster
    7272
    7373    nbands is a comma separated string of 1-based band indices indicating the bands to copy into the output raster
     
    7979}}}
    8080
    81 ST_Band(rast raster, nbands text, delimiter char) -> raster
     814. ST_Band(rast raster, nbands text, delimiter char) -> raster
    8282
    8383    nbands is a user-specified delimiter separated string of 1-based band indices indicating the bands to copy into the output raster
     
    8989}}}
    9090
    91 ST_Band(rast raster) -> raster
     915. ST_Band(rast raster) -> raster
    9292
    9393    the band to extract is automatically assumed to be one.
     
    105105As part of the process to provide complete implementations of ST_AsJPEG and ST_AsPNG, a method is required to reclassify larger numbers unable to be contained in 8BUI (JPEG and PNG) and 16BUI (PNG). For this reclassification function, we need to get the min and max values of a band, thus ST_MinMax.
    106106
    107 ST_MinMax(rast raster, nband int) -> record
     1071. ST_MinMax(rast raster, nband int) -> record
    108108
    109109    returns one record of two columns (min, max)
     
    113113}}}
    114114
    115 ST_MinMax(rast raster) -> record
     1152. ST_MinMax(rast raster) -> record
    116116
    117117    assumes that the band index = 1
     
    211211The TIFF format is probably the most robust available for converting rasters to GDAL rasters. Not only does it support all PostGIS Raster pixel types, it also provides plenty of creation options and possibly no issues with the number of bands. The only limitation found is that there can only be one NODATA value for all bands.
    212212
     213''If the compression parameter/option is specified to JPEG, all bands must be of pixel type 8BUI.  If the compression parameter/option is specified to one of the CCITT options, all bands must be of pixel type 1BB.''
     214
    213215The next three functions are the most basic of the ST_AsTIFF functions.
    214216
     
    344346Bborie: this is a generic interface to outputting a supported and installed GDAL raster:
    345347
    346 ST_AsGDALRaster(rast raster, format text, options text[], srs text) -> bytea
     3481. ST_AsGDALRaster(rast raster, format text, options text[], srs text) -> bytea
    347349
    348350  This is the most generic and GDAL-specific method to convert a raster to a GDAL raster.  All other version of ST_AsGDALRaster and other format specific functions (ST_AsJPEG, ST_AsTIFF and ST_AsPNG) are all wrappers around this function.  Reference information for the format and options arguments of a particular format are specified at: http://gdal.org/formats_list.html.  The arguments specified are:
     
    361363
    362364
    363 ST_AsGDALRaster(rast raster, format text, options text[]) -> bytea
     3652. ST_AsGDALRaster(rast raster, format text, options text[]) -> bytea
    364366
    365367  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.
     
    371373}}}
    372374
    373 ST_AsGDALRaster(rast raster, format text) -> bytea
     3753. ST_AsGDALRaster(rast raster, format text) -> bytea
    374376
    375377  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.