Ticket #985 (closed task: fixed)
[raster] ST_Count
| Reported by: | dustymugs | Owned by: | dustymugs |
|---|---|---|---|
| Priority: | medium | Milestone: | PostGIS 2.0.0 |
| Component: | raster | Version: | trunk |
| Keywords: | history | Cc: |
Description
This function calls ST_SummaryStats and only returns the count from that function.
1. ST_Count(rast raster, nband int, hasnodata boolean) -> integer
returns the count as an integer
nband: index of band
hasnodata: if FALSE, any pixel who's value is nodata is ignored
ST_Count(rast, 1, FALSE)
2. ST_Count(rast raster, nband int) -> integer
assumes hasnodata = TRUE
ST_Count(rast, 2)
3. ST_Count(rast raster, hasnodata boolean) -> integer
assumes nband = 1
ST_Count(rast, TRUE)
4. ST_Count(rast raster) -> integer
assumes nband = 1 and hasnodata = TRUE
ST_Count(rast)
The set of ST_ApproxCount functions are:
1. ST_ApproxCount(rast raster, nband int, hasnodata boolean, sample_percent double precision) -> integer
sample_percent: a value between 0 and 1 indicating the percentage of the raster band's pixels to consider
ST_ApproxCount(rast, 3, FALSE, 0.1) ST_ApproxCount(rast, 1, TRUE, 0.5)
2. ST_ApproxCount(rast raster, nband int, sample_percent double precision) -> integer
assumes that nband = 1
ST_ApproxCount(rast, 2 0.01) ST_ApproxCount(rast, 4, 0.025)
3. ST_ApproxCount(rast raster, hasnodata boolean, sample_percent double precision) -> integer
assumes that nband = 1
ST_ApproxCount(rast, FALSE, 0.01) ST_ApproxCount(rast, TRUE, 0.025)
4. ST_ApproxCount(rast raster, sample_percent double precision) -> integer
assumes that nband = 1 and hasnodata = TRUE
ST_ApproxCount(rast, 0.25)
5. ST_ApproxCount(rast raster) -> integer
assumes that nband = 1, hasnodata = TRUE and sample_percent = 0.1
ST_ApproxCount(rast)
The following functions are provided for coverage tables.
1. ST_Count(rastertable text, rastercolumn text, nband int, hasnodata boolean) -> integer
rastertable: name of table with raster column
rastercolumn: name of column of data type raster
ST_Count('tmax_2010', 'rast', 1, FALSE)
ST_Count('precip_2011', 'rast', 1, TRUE)
2. ST_Count(rastertable text, rastercolumn text, nband int) -> integer
hasnodata = TRUE
ST_Count('tmax_2010', 'rast', 1)
3. ST_Count(rastertable text, rastercolumn text, hasnodata boolean) -> integer
nband = 1
ST_Count('precip_2011', 'rast', TRUE)
4. ST_Count(rastertable text, rastercolumn text) -> integer
nband = 1 and hasnodata = TRUE
ST_Count('tmin_2009', 'rast')
Variations for ST_ApproxCount are:
1. ST_ApproxCount(rastertable text, rastercolumn text, nband int, hasnodata boolean, sample_percent double precision) -> integer
ST_ApproxCount('tmax_2010', 'rast', 1, FALSE, 0.5)
ST_ApproxCount('precip_2011', 'rast', 1, TRUE, 0.2)
2. ST_ApproxCount(rastertable text, rastercolumn text, nband int, sample_percent double precision) -> integer
hasnodata = TRUE
ST_ApproxCount('tmax_2010', 'rast', 1, 0.5)
ST_ApproxCount('precip_2011', 'rast', 1, 0.2)
3. ST_ApproxCount(rastertable text, rastercolumn text, hasnodata boolean, sample_percent double precision) -> integer
nband = 1
ST_ApproxCount('tmax_2010', 'rast', FALSE, 0.5)
ST_ApproxCount('precip_2011', 'rast', TRUE, 0.2)
4. ST_ApproxCount(rastertable text, rastercolumn text, sample_percent double precision) -> integer
nband = 1 and hasnodata = TRUE
ST_ApproxCount('tmax_2010', 'rast', 0.5)
ST_ApproxCount('precip_2011', 'rast', 0.2)
5. ST_ApproxCount(rastertable text, rastercolumn text) -> integer
nband = 1, hasnodata = TRUE and sample_percent = 0.1
ST_ApproxCount('tmax_2010', 'rast')
ST_ApproxCount('precip_2011', 'rast')
