Changes between Version 76 and Version 77 of WKTRaster/SpecificationWorking03


Ignore:
Timestamp:
May 16, 2011, 11:05:03 AM (13 years ago)
Author:
Bborie Park
Comment:

ST_Mean

Legend:

Unmodified
Added
Removed
Modified
  • WKTRaster/SpecificationWorking03

    v76 v77  
    285285
    286286The mean returned in the coverage functions (has rastertable and rastercolumn arguments) is a weighted mean of the means of each raster tile. The standard deviation returned is the cumulative standard deviation of all raster tiles.
     287
     288----
     289
     290'''ST_Mean(raster, nband) -> double precision'''[[BR]]
     291This function calls ST_SummaryStats and only returns the mean from that function.
     292
     2931. ST_Mean(rast raster, nband int, hasnodata boolean) -> double precision
     294
     295  returns the mean as a double precision
     296
     297  nband: index of band
     298
     299  hasnodata: if FALSE, any pixel who's value is nodata is ignored
     300
     301{{{
     302ST_Mean(rast, 1, FALSE)
     303}}}
     304
     3052. ST_Mean(rast raster, nband int) -> double precision
     306
     307  assumes hasnodata = FALSE
     308
     309{{{
     310ST_Mean(rast, 2)
     311}}}
     312
     3133. ST_Mean(rast raster, hasnodata boolean) -> double precision
     314
     315  assumes nband = 1
     316
     317{{{
     318ST_Mean(rast, TRUE)
     319}}}
     320
     3214. ST_Mean(rast raster) -> double precision
     322
     323  assumes nband = 1 and hasnodata = FALSE
     324
     325{{{
     326ST_Mean(rast)
     327}}}
     328
     329The set of ST_ApproxMean functions are:
     330
     3311. ST_ApproxMean(rast raster, nband int, hasnodata boolean, sample_percent double precision) -> double precision
     332
     333  sample_percent: a value between 0 and 1 indicating the percentage of the raster band's pixels to consider
     334
     335{{{
     336ST_ApproxMean(rast, 3, FALSE, 0.1)
     337
     338ST_ApproxMean(rast, 1, TRUE, 0.5)
     339}}}
     340
     3412. ST_ApproxMean(rast raster, nband int, sample_percent double precision) -> double precision
     342
     343  assumes that nband = 1
     344
     345{{{
     346ST_ApproxMean(rast, 2 0.01)
     347
     348ST_ApproxMean(rast, 4, 0.025)
     349}}}
     350
     3513. ST_ApproxMean(rast raster, hasnodata boolean, sample_percent double precision) -> double precision
     352
     353  assumes that nband = 1
     354
     355{{{
     356ST_ApproxMean(rast, FALSE, 0.01)
     357
     358ST_ApproxMean(rast, TRUE, 0.025)
     359}}}
     360
     3614. ST_ApproxMean(rast raster, sample_percent double precision) -> double precision
     362
     363  assumes that nband = 1 and hasnodata = FALSE
     364
     365{{{
     366ST_ApproxMean(rast, 0.25)
     367}}}
     368
     3695. ST_ApproxMean(rast raster) -> double precision
     370
     371  assumes that nband = 1, hasnodata = FALSE and sample_percent = 0.1
     372
     373{{{
     374ST_ApproxMean(rast)
     375}}}
     376
     377The following functions are provided for coverage tables.
     378
     3791. ST_Mean(rastertable text, rastercolumn text, nband int, hasnodata boolean) -> double precision
     380
     381  rastertable: name of table with raster column
     382
     383  rastercolumn: name of column of data type raster
     384
     385{{{
     386ST_Mean('tmax_2010', 'rast', 1, FALSE)
     387
     388ST_Mean('precip_2011', 'rast', 1, TRUE)
     389}}}
     390
     3912. ST_Mean(rastertable text, rastercolumn text, nband int) -> double precision
     392
     393    hasnodata = FALSE
     394
     395{{{
     396ST_Mean('tmax_2010', 'rast', 1)
     397}}}
     398
     3993. ST_Mean(rastertable text, rastercolumn text, hasnodata boolean) -> double precision
     400
     401    nband = 1
     402
     403{{{
     404ST_Mean('precip_2011', 'rast', TRUE)
     405}}}
     406
     4074. ST_Mean(rastertable text, rastercolumn text) -> double precision
     408
     409    nband = 1 and hasnodata = FALSE
     410
     411{{{
     412ST_Mean('tmin_2009', 'rast')
     413}}}
     414
     415Variations for ST_ApproxMean are:
     416
     4171. ST_ApproxMean(rastertable text, rastercolumn text, nband int, hasnodata boolean, sample_percent double precision) -> double precision
     418
     419{{{
     420ST_ApproxMean('tmax_2010', 'rast', 1, FALSE, 0.5)
     421
     422ST_ApproxMean('precip_2011', 'rast', 1, TRUE, 0.2)
     423}}}
     424
     4252. ST_ApproxMean(rastertable text, rastercolumn text, nband int, sample_percent double precision) -> double precision
     426
     427    hasnodata = FALSE
     428
     429{{{
     430ST_ApproxMean('tmax_2010', 'rast', 1, 0.5)
     431
     432ST_ApproxMean('precip_2011', 'rast', 1, 0.2)
     433}}}
     434
     4353. ST_ApproxMean(rastertable text, rastercolumn text, hasnodata boolean, sample_percent double precision) -> double precision
     436
     437    nband = 1
     438
     439{{{
     440ST_ApproxMean('tmax_2010', 'rast', FALSE, 0.5)
     441
     442ST_ApproxMean('precip_2011', 'rast', TRUE, 0.2)
     443}}}
     444
     4454. ST_ApproxMean(rastertable text, rastercolumn text, sample_percent double precision) -> double precision
     446
     447    nband = 1 and hasnodata = FALSE
     448
     449{{{
     450ST_ApproxMean('tmax_2010', 'rast', 0.5)
     451
     452ST_ApproxMean('precip_2011', 'rast', 0.2)
     453}}}
     454
     4555. ST_ApproxMean(rastertable text, rastercolumn text) -> double precision
     456
     457    nband = 1, hasnodata = FALSE and sample_percent = 0.1
     458
     459{{{
     460ST_ApproxMean('tmax_2010', 'rast')
     461
     462ST_ApproxMean('precip_2011', 'rast')
     463}}}
     464
     465The mean returned in the coverage functions (has rastertable and rastercolumn arguments) is a weighted mean of the means of each raster tile.
    287466
    288467----