#932 closed task (fixed)
[raster] ST_StdDev
Reported by: | dustymugs | Owned by: | dustymugs |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.0.0 |
Component: | raster | Version: | master |
Keywords: | history | Cc: |
Description
A function to get the standard deviation (or sample deviation if approximating) of a raster's band.
- ST_StdDev(rast raster, nband int, ignore_nodata boolean) → double
returns the standard deviation
nband: index of band to process on
ignore_nodata: if TRUE, any pixel who's value is nodata is ignored.
ST_StdDev(rast, 2, TRUE)
- ST_StdDev(rast raster, nband int) → double
assumes ignore_nodata = TRUE
ST_StdDev(rast, 2)
- ST_StdDev(rast raster, ignore_nodata boolean) → double
assumes band index = 1
ST_StdDev(rast, FALSE)
- ST_StdDev(rast raster) → double
assumes band index = 1 and ignore_nodata = TRUE
ST_StdDev(rast)
Four approximation functions are also proposed sacrificing some accuracy for speed, especially on large rasters (10000 x 10000).
- ST_ApproxStdDev(rast raster, nband int, ignore_nodata boolean, sample_percent double precision) → double
sample_percent: a value between 0 and 1 indicating the percentage of the raster band's pixels to consider in computing the summary stats.
ST_ApproxStdDev(rast, 3, FALSE, 0.1) ST_ApproxStdDev(rast, 1, TRUE, 0.5)
- ST_ApproxStdDev(rast raster, ignore_nodata boolean, sample_percent double precision) → double
assumes that nband = 1
ST_ApproxStdDev(rast, FALSE, 0.01) ST_ApproxStdDev(rast, TRUE, 0.025)
- ST_ApproxStdDev(rast raster, sample_percent double precision) → double
assumes that nband = 1 and ignore_nodata = TRUE
ST_ApproxStdDev(rast, 0.25)
- ST_ApproxStdDev(rast raster) → double
assumes that nband = 1, ignore_nodata = TRUE and sample_percent = 0.1
ST_ApproxStdDev(rast)
Attachments (1)
Change History (5)
comment:1 by , 14 years ago
Status: | new → assigned |
---|
by , 14 years ago
Attachment: | st_stddev.patch added |
---|
Adds ST_StdDev function. ST_SummaryStats is required for this patch.
comment:2 by , 14 years ago
Adds ST_StdDev function, which builds upon ST_SummaryStats. Merges cleanly against r7145.
The following patches must be merged first for this patch to merge cleanly:
- ST_Band
- ST_SummaryStats
- ST_Mean
comment:3 by , 14 years ago
Keywords: | history added |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Added in r7150
comment:4 by , 13 years ago
Milestone: | PostGIS Raster Future → PostGIS 2.0.0 |
---|
A set of ST_StdDev and ST_ApproxStdDev variations for processing coverages:
Variations for ST_ApproxStdDev are:
The standard deviation returned is the cumulative standard deviation of all raster tiles.