#986 closed task (fixed)
[raster] ST_Sum
Reported by: | Bborie Park | Owned by: | Bborie Park |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.0.0 |
Component: | raster | Version: | master |
Keywords: | history | Cc: |
Description
This function calls ST_SummaryStats and only returns the sum from that function.
- ST_Sum(rast raster, nband int, hasnodata boolean) -> double precision
returns the sum as an integer
nband: index of band
hasnodata: if FALSE, any pixel who's value is nodata is ignored
ST_Sum(rast, 1, FALSE)
- ST_Sum(rast raster, nband int) -> double precision
assumes hasnodata = TRUE
ST_Sum(rast, 2)
- ST_Sum(rast raster, hasnodata boolean) -> double precision
assumes nband = 1
ST_Sum(rast, TRUE)
- ST_Sum(rast raster) -> double precision
assumes nband = 1 and hasnodata = TRUE
ST_Sum(rast)
The set of ST_ApproxSum functions are:
- ST_ApproxSum(rast raster, nband int, hasnodata boolean, sample_percent double precision) -> double precision
sample_percent: a value between 0 and 1 indicating the percentage of the raster band's pixels to consider
ST_ApproxSum(rast, 3, FALSE, 0.1) ST_ApproxSum(rast, 1, TRUE, 0.5)
- ST_ApproxSum(rast raster, nband int, sample_percent double precision) -> double precision
assumes that nband = 1
ST_ApproxSum(rast, 2 0.01) ST_ApproxSum(rast, 4, 0.025)
- ST_ApproxSum(rast raster, hasnodata boolean, sample_percent double precision) -> double precision
assumes that nband = 1
ST_ApproxSum(rast, FALSE, 0.01) ST_ApproxSum(rast, TRUE, 0.025)
- ST_ApproxSum(rast raster, sample_percent double precision) -> double precision
assumes that nband = 1 and hasnodata = TRUE
ST_ApproxSum(rast, 0.25)
- ST_ApproxSum(rast raster) -> double precision
assumes that nband = 1, hasnodata = TRUE and sample_percent = 0.1
ST_ApproxSum(rast)
The following functions are provided for coverage tables.
- ST_Sum(rastertable text, rastercolumn text, nband int, hasnodata boolean) -> double precision
rastertable: name of table with raster column
rastercolumn: name of column of data type raster
ST_Sum('tmax_2010', 'rast', 1, FALSE) ST_Sum('precip_2011', 'rast', 1, TRUE)
- ST_Sum(rastertable text, rastercolumn text, nband int) -> double precision
hasnodata = TRUE
ST_Sum('tmax_2010', 'rast', 1)
- ST_Sum(rastertable text, rastercolumn text, hasnodata boolean) -> double precision
nband = 1
ST_Sum('precip_2011', 'rast', TRUE)
- ST_Sum(rastertable text, rastercolumn text) -> double precision
nband = 1 and hasnodata = TRUE
ST_Sum('tmin_2009', 'rast')
Variations for ST_ApproxSum are:
- ST_ApproxSum(rastertable text, rastercolumn text, nband int, hasnodata boolean, sample_percent double precision) -> double precision
ST_ApproxSum('tmax_2010', 'rast', 1, FALSE, 0.5) ST_ApproxSum('precip_2011', 'rast', 1, TRUE, 0.2)
- ST_ApproxSum(rastertable text, rastercolumn text, nband int, sample_percent double precision) -> double precision
hasnodata = TRUE
ST_ApproxSum('tmax_2010', 'rast', 1, 0.5) ST_ApproxSum('precip_2011', 'rast', 1, 0.2)
- ST_ApproxSum(rastertable text, rastercolumn text, hasnodata boolean, sample_percent double precision) -> double precision
nband = 1
ST_ApproxSum('tmax_2010', 'rast', FALSE, 0.5) ST_ApproxSum('precip_2011', 'rast', TRUE, 0.2)
- ST_ApproxSum(rastertable text, rastercolumn text, sample_percent double precision) -> double precision
nband = 1 and hasnodata = TRUE
ST_ApproxSum('tmax_2010', 'rast', 0.5) ST_ApproxSum('precip_2011', 'rast', 0.2)
- ST_ApproxSum(rastertable text, rastercolumn text) -> double precision
nband = 1, hasnodata = TRUE and sample_percent = 0.1
ST_ApproxSum('tmax_2010', 'rast') ST_ApproxSum('precip_2011', 'rast')
Change History (3)
comment:1 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 by , 13 years ago
Keywords: | history added |
---|---|
Milestone: | PostGIS Raster Future → PostGIS 2.0.0 |
Added in r7246.