Changes between Version 69 and Version 70 of WKTRaster/SpecificationWorking03


Ignore:
Timestamp:
Apr 24, 2011, 11:10:02 AM (13 years ago)
Author:
Bborie Park
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • WKTRaster/SpecificationWorking03

    v69 v70  
    139139{{{
    140140ST_MinMax(rast)
     141}}}
     142
     143Due to the time it may take to do on-the-fly determination of min/max for large rasters (say 10000 x 10000), an alternative that sacrifices accuracy for speed is required.  The following functions sample a percentage of the raster in a methodical randomized manner.  The algorithm used for sampling is...
     144
     1451. select the larger dimension of the width and height.  compute the number of pixels to sample in each "row" of the larger dimension
     146
     1472. pick pixels from each "row" of the larger dimension in an incremental rolling manner where each increment is randomly determined.
     148
     149The functions are:
     150
     1511. ST_ApproxMinMax(rast raster, nband int, ignore_nodata boolean, sample float8) -> record
     152
     153  sample: a value between 0 and 100 indicating the percentage of the raster band's pixels to consider when determining the min/max pair.
     154
     155{{{
     156ST_ApproxMinMax(rast, 3, FALSE, 10)
     157
     158ST_ApproxMinMax(rast, 1, TRUE, 50)
     159}}}
     160
     1612. ST_ApproxMinMax(rast raster, ignore_nodata boolean, sample float8) -> record
     162
     163  assumes that nband = 1
     164
     165{{{
     166ST_ApproxMinMax(rast, FALSE, 1)
     167
     168ST_ApproxMinMax(rast, TRUE, 2.5)
     169}}}
     170
     1713. ST_ApproxMinMax(rast raster, sample float8) -> record
     172
     173  assumes that nband = 1 and ignore_nodata = TRUE
     174
     175{{{
     176ST_ApproxMinMax(rast, 25)
     177}}}
     178
     1794. ST_ApproxMinMax(rast raster) -> record
     180
     181  assumes that nband = 1, ignore_nodata = TRUE and sample = 10
     182
     183{{{
     184ST_ApproxMinMax(rast)
    141185}}}
    142186