Changes between Version 78 and Version 79 of WKTRaster/SpecificationWorking03


Ignore:
Timestamp:
05/16/11 11:22:48 (14 years ago)
Author:
dustymugs
Comment:

Updated ST_MinMax

Legend:

Unmodified
Added
Removed
Modified
  • WKTRaster/SpecificationWorking03

    v78 v79  
    647647
    648648'''ST_MinMax(raster, nband) -> record'''[[BR]]
    649 As 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.  This function calls upon ST_SummaryStats.
     649This function calls ST_SummaryStats and only returns the min and max values from that function.
    650650
    6516511. ST_MinMax(rast raster, nband int, hasnodata boolean) -> record
    652652
    653   returns one record of two columns (min, max)
    654 
    655   nband: index of band to process on
    656 
    657   hasnodata: if FALSE, any pixel who's value is nodata is ignored.
    658 
    659 {{{
    660 ST_MinMax(rast, 2, TRUE)
     653  returns the record (min double precision, max double precision)
     654
     655  nband: index of band
     656
     657  hasnodata: if FALSE, any pixel who's value is nodata is ignored
     658
     659{{{
     660ST_MinMax(rast, 1, FALSE)
    661661}}}
    662662
     
    6716713. ST_MinMax(rast raster, hasnodata boolean) -> record
    672672
    673   assumes band index = 1
    674 
    675 {{{
    676 ST_MinMax(rast, FALSE)
     673  assumes nband = 1
     674
     675{{{
     676ST_MinMax(rast, TRUE)
    677677}}}
    678678
    6796794. ST_MinMax(rast raster) -> record
    680680
    681   assumes band index = 1 and hasnodata = FALSE
     681  assumes nband = 1 and hasnodata = FALSE
    682682
    683683{{{
     
    685685}}}
    686686
    687 The ST_ApproxMinMax functions are:
    688 
    689 1. ST_ApproxMinMax(rast raster, nband int, hasnodata boolean, sample_percent double precision) -> record
    690 
    691   sample_percent: a value between 0 and 1 indicating the percentage of the raster band's pixels to consider when determining the min/max pair.
     687The set of ST_ApproxMinMax functions are:
     688
     6891. ST_ApproxMinMax(rast raster, nband int, hasnodata boolean, sample_percent record) -> record
     690
     691  sample_percent: a value between 0 and 1 indicating the percentage of the raster band's pixels to consider
    692692
    693693{{{
     
    733733}}}
    734734
    735 ----
     735The following functions are provided for coverage tables.
     736
     7371. ST_MinMax(rastertable text, rastercolumn text, nband int, hasnodata boolean) -> record
     738
     739  rastertable: name of table with raster column
     740
     741  rastercolumn: name of column of data type raster
     742
     743{{{
     744ST_MinMax('tmax_2010', 'rast', 1, FALSE)
     745
     746ST_MinMax('precip_2011', 'rast', 1, TRUE)
     747}}}
     748
     7492. ST_MinMax(rastertable text, rastercolumn text, nband int) -> record
     750
     751    hasnodata = FALSE
     752
     753{{{
     754ST_MinMax('tmax_2010', 'rast', 1)
     755}}}
     756
     7573. ST_MinMax(rastertable text, rastercolumn text, hasnodata boolean) -> record
     758
     759    nband = 1
     760
     761{{{
     762ST_MinMax('precip_2011', 'rast', TRUE)
     763}}}
     764
     7654. ST_MinMax(rastertable text, rastercolumn text) -> record
     766
     767    nband = 1 and hasnodata = FALSE
     768
     769{{{
     770ST_MinMax('tmin_2009', 'rast')
     771}}}
     772
     773Variations for ST_ApproxMinMax are:
     774
     7751. ST_ApproxMinMax(rastertable text, rastercolumn text, nband int, hasnodata boolean, sample_percent double precision) -> record
     776
     777{{{
     778ST_ApproxMinMax('tmax_2010', 'rast', 1, FALSE, 0.5)
     779
     780ST_ApproxMinMax('precip_2011', 'rast', 1, TRUE, 0.2)
     781}}}
     782
     7832. ST_ApproxMinMax(rastertable text, rastercolumn text, nband int, sample_percent double precision) -> record
     784
     785    hasnodata = FALSE
     786
     787{{{
     788ST_ApproxMinMax('tmax_2010', 'rast', 1, 0.5)
     789
     790ST_ApproxMinMax('precip_2011', 'rast', 1, 0.2)
     791}}}
     792
     7933. ST_ApproxMinMax(rastertable text, rastercolumn text, hasnodata boolean, sample_percent double precision) -> record
     794
     795    nband = 1
     796
     797{{{
     798ST_ApproxMinMax('tmax_2010', 'rast', FALSE, 0.5)
     799
     800ST_ApproxMinMax('precip_2011', 'rast', TRUE, 0.2)
     801}}}
     802
     8034. ST_ApproxMinMax(rastertable text, rastercolumn text, sample_percent double precision) -> record
     804
     805    nband = 1 and hasnodata = FALSE
     806
     807{{{
     808ST_ApproxMinMax('tmax_2010', 'rast', 0.5)
     809
     810ST_ApproxMinMax('precip_2011', 'rast', 0.2)
     811}}}
     812
     8135. ST_ApproxMinMax(rastertable text, rastercolumn text) -> record
     814
     815    nband = 1, hasnodata = FALSE and sample_percent = 0.1
     816
     817{{{
     818ST_ApproxMinMax('tmax_2010', 'rast')
     819
     820ST_ApproxMinMax('precip_2011', 'rast')
     821}}}
     822
     823----
     824
    736825'''ST_AsJPEG(raster, quality) -> JPEG as "bytea"'''[[BR]]
    737826Return the raster as a JPEG encoded as a PostgreSQL bytea. By default quality is set to 75, but this option can be used to select other values. Values must be in the range 10-100. Low values result in higher compression ratios, but poorer image quality. Values above 95 are not meaningfully better quality but can but substantially larger. (copied from http://www.gdal.org/frmt_jpeg.html)