Changes between Version 86 and Version 87 of WKTRaster/SpecificationWorking03


Ignore:
Timestamp:
May 26, 2011, 10:39:11 AM (13 years ago)
Author:
Bborie Park
Comment:

ST_Count

Legend:

Unmodified
Added
Removed
Modified
  • WKTRaster/SpecificationWorking03

    v86 v87  
    12071207}}}
    12081208
    1209 The 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.
     1209The mean returned in the coverage functions (has rastertable and rastercolumn arguments) is the true mean of the raster tiles. The standard deviation returned is the cumulative standard deviation of all raster tiles.
     1210
     1211----
     1212
     1213'''ST_Count(raster, nband) -> bigint'''[[BR]]
     1214
     1215This function calls ST_SummaryStats and only returns the count from that function.
     1216
     12171. ST_Count(rast raster, nband int, hasnodata boolean) -> bigint
     1218
     1219    returns the count as an integer
     1220
     1221    nband: index of band
     1222
     1223    hasnodata: if FALSE, any pixel who's value is nodata is ignored
     1224
     1225{{{
     1226ST_Count(rast, 1, FALSE)
     1227}}}
     1228
     12292. ST_Count(rast raster, nband int) -> bigint
     1230
     1231    assumes hasnodata = TRUE
     1232
     1233{{{
     1234ST_Count(rast, 2)
     1235}}}
     1236
     12373. ST_Count(rast raster, hasnodata boolean) -> bigint
     1238
     1239    assumes nband = 1
     1240
     1241{{{
     1242ST_Count(rast, TRUE)
     1243}}}
     1244
     12454. ST_Count(rast raster) -> bigint
     1246
     1247    assumes nband = 1 and hasnodata = TRUE
     1248
     1249{{{
     1250ST_Count(rast)
     1251}}}
     1252
     1253The set of ST_ApproxCount functions are:
     1254
     12551. ST_ApproxCount(rast raster, nband int, hasnodata boolean, sample_percent double precision) -> bigint
     1256
     1257    sample_percent: a value between 0 and 1 indicating the percentage of the raster band's pixels to consider
     1258
     1259{{{
     1260ST_ApproxCount(rast, 3, FALSE, 0.1)
     1261
     1262ST_ApproxCount(rast, 1, TRUE, 0.5)
     1263}}}
     1264
     12652. ST_ApproxCount(rast raster, nband int, sample_percent double precision) -> bigint
     1266
     1267    assumes that nband = 1
     1268
     1269{{{
     1270ST_ApproxCount(rast, 2 0.01)
     1271
     1272ST_ApproxCount(rast, 4, 0.025)
     1273}}}
     1274
     12753. ST_ApproxCount(rast raster, hasnodata boolean, sample_percent double precision) -> bigint
     1276
     1277    assumes that nband = 1
     1278
     1279{{{
     1280ST_ApproxCount(rast, FALSE, 0.01)
     1281
     1282ST_ApproxCount(rast, TRUE, 0.025)
     1283}}}
     1284
     12854. ST_ApproxCount(rast raster, sample_percent double precision) -> bigint
     1286
     1287    assumes that nband = 1 and hasnodata = TRUE
     1288
     1289{{{
     1290ST_ApproxCount(rast, 0.25)
     1291}}}
     1292
     12935. ST_ApproxCount(rast raster) -> bigint
     1294
     1295    assumes that nband = 1, hasnodata = TRUE and sample_percent = 0.1
     1296
     1297{{{
     1298ST_ApproxCount(rast)
     1299}}}
     1300
     1301The following functions are provided for coverage tables.
     1302
     13031. ST_Count(rastertable text, rastercolumn text, nband int, hasnodata boolean) -> bigint
     1304
     1305    rastertable: name of table with raster column
     1306
     1307    rastercolumn: name of column of data type raster
     1308
     1309{{{
     1310ST_Count('tmax_2010', 'rast', 1, FALSE)
     1311
     1312ST_Count('precip_2011', 'rast', 1, TRUE)
     1313}}}
     1314
     13152. ST_Count(rastertable text, rastercolumn text, nband int) -> bigint
     1316
     1317    hasnodata = TRUE
     1318
     1319{{{
     1320ST_Count('tmax_2010', 'rast', 1)
     1321}}}
     1322
     13233. ST_Count(rastertable text, rastercolumn text, hasnodata boolean) -> bigint
     1324
     1325    nband = 1
     1326
     1327{{{
     1328ST_Count('precip_2011', 'rast', TRUE)
     1329}}}
     1330
     13314. ST_Count(rastertable text, rastercolumn text) -> bigint
     1332
     1333    nband = 1 and hasnodata = TRUE
     1334
     1335{{{
     1336ST_Count('tmin_2009', 'rast')
     1337}}}
     1338
     1339Variations for ST_ApproxCount are:
     1340
     13411. ST_ApproxCount(rastertable text, rastercolumn text, nband int, hasnodata boolean, sample_percent double precision) -> bigint
     1342
     1343{{{
     1344ST_ApproxCount('tmax_2010', 'rast', 1, FALSE, 0.5)
     1345
     1346ST_ApproxCount('precip_2011', 'rast', 1, TRUE, 0.2)
     1347}}}
     1348
     13492. ST_ApproxCount(rastertable text, rastercolumn text, nband int, sample_percent double precision) -> bigint
     1350
     1351    hasnodata = TRUE
     1352
     1353{{{
     1354ST_ApproxCount('tmax_2010', 'rast', 1, 0.5)
     1355
     1356ST_ApproxCount('precip_2011', 'rast', 1, 0.2)
     1357}}}
     1358
     13593. ST_ApproxCount(rastertable text, rastercolumn text, hasnodata boolean, sample_percent double precision) -> bigint
     1360
     1361    nband = 1
     1362
     1363{{{
     1364ST_ApproxCount('tmax_2010', 'rast', FALSE, 0.5)
     1365
     1366ST_ApproxCount('precip_2011', 'rast', TRUE, 0.2)
     1367}}}
     1368
     13694. ST_ApproxCount(rastertable text, rastercolumn text, sample_percent double precision) -> bigint
     1370
     1371    nband = 1 and hasnodata = TRUE
     1372
     1373{{{
     1374ST_ApproxCount('tmax_2010', 'rast', 0.5)
     1375
     1376ST_ApproxCount('precip_2011', 'rast', 0.2)
     1377}}}
     1378
     13795. ST_ApproxCount(rastertable text, rastercolumn text) -> bigint
     1380
     1381    nband = 1, hasnodata = TRUE and sample_percent = 0.1
     1382
     1383{{{
     1384ST_ApproxCount('tmax_2010', 'rast')
     1385
     1386ST_ApproxCount('precip_2011', 'rast')
     1387}}}
    12101388
    12111389----
     
    13861564}}}
    13871565
    1388 The mean returned in the coverage functions (has rastertable and rastercolumn arguments) is a weighted mean of the means of each raster tile.
     1566The mean returned in the coverage functions (has rastertable and rastercolumn arguments) is the true mean of the raster tiles.
    13891567
    13901568----