Changes between Version 87 and Version 88 of WKTRaster/SpecificationWorking03


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

ST_Sum

Legend:

Unmodified
Added
Removed
Modified
  • WKTRaster/SpecificationWorking03

    v87 v88  
    13891389----
    13901390
     1391'''ST_Sum(raster, nband) -> double precision'''[[BR]]
     1392
     1393This function calls ST_SummaryStats and only returns the sum from that function.
     1394
     13951. ST_Sum(rast raster, nband int, hasnodata boolean) -> double precision
     1396
     1397    returns the sum as an integer
     1398
     1399    nband: index of band
     1400
     1401    hasnodata: if FALSE, any pixel who's value is nodata is ignored
     1402
     1403{{{
     1404ST_Sum(rast, 1, FALSE)
     1405}}}
     1406
     14072. ST_Sum(rast raster, nband int) -> double precision
     1408
     1409    assumes hasnodata = TRUE
     1410
     1411{{{
     1412ST_Sum(rast, 2)
     1413}}}
     1414
     14153. ST_Sum(rast raster, hasnodata boolean) -> double precision
     1416
     1417    assumes nband = 1
     1418
     1419{{{
     1420ST_Sum(rast, TRUE)
     1421}}}
     1422
     14234. ST_Sum(rast raster) -> double precision
     1424
     1425    assumes nband = 1 and hasnodata = TRUE
     1426
     1427{{{
     1428ST_Sum(rast)
     1429}}}
     1430
     1431The set of ST_ApproxSum functions are:
     1432
     14331. ST_ApproxSum(rast raster, nband int, hasnodata boolean, sample_percent double precision) -> double precision
     1434
     1435    sample_percent: a value between 0 and 1 indicating the percentage of the raster band's pixels to consider
     1436
     1437{{{
     1438ST_ApproxSum(rast, 3, FALSE, 0.1)
     1439
     1440ST_ApproxSum(rast, 1, TRUE, 0.5)
     1441}}}
     1442
     14432. ST_ApproxSum(rast raster, nband int, sample_percent double precision) -> double precision
     1444
     1445    assumes that nband = 1
     1446
     1447{{{
     1448ST_ApproxSum(rast, 2 0.01)
     1449
     1450ST_ApproxSum(rast, 4, 0.025)
     1451}}}
     1452
     14533. ST_ApproxSum(rast raster, hasnodata boolean, sample_percent double precision) -> double precision
     1454
     1455    assumes that nband = 1
     1456
     1457{{{
     1458ST_ApproxSum(rast, FALSE, 0.01)
     1459
     1460ST_ApproxSum(rast, TRUE, 0.025)
     1461}}}
     1462
     14634. ST_ApproxSum(rast raster, sample_percent double precision) -> double precision
     1464
     1465    assumes that nband = 1 and hasnodata = TRUE
     1466
     1467{{{
     1468ST_ApproxSum(rast, 0.25)
     1469}}}
     1470
     14715. ST_ApproxSum(rast raster) -> double precision
     1472
     1473    assumes that nband = 1, hasnodata = TRUE and sample_percent = 0.1
     1474
     1475{{{
     1476ST_ApproxSum(rast)
     1477}}}
     1478
     1479The following functions are provided for coverage tables.
     1480
     14811. ST_Sum(rastertable text, rastercolumn text, nband int, hasnodata boolean) -> double precision
     1482
     1483    rastertable: name of table with raster column
     1484
     1485    rastercolumn: name of column of data type raster
     1486
     1487{{{
     1488ST_Sum('tmax_2010', 'rast', 1, FALSE)
     1489
     1490ST_Sum('precip_2011', 'rast', 1, TRUE)
     1491}}}
     1492
     14932. ST_Sum(rastertable text, rastercolumn text, nband int) -> double precision
     1494
     1495    hasnodata = TRUE
     1496
     1497{{{
     1498ST_Sum('tmax_2010', 'rast', 1)
     1499}}}
     1500
     15013. ST_Sum(rastertable text, rastercolumn text, hasnodata boolean) -> double precision
     1502
     1503    nband = 1
     1504
     1505{{{
     1506ST_Sum('precip_2011', 'rast', TRUE)
     1507}}}
     1508
     15094. ST_Sum(rastertable text, rastercolumn text) -> double precision
     1510
     1511    nband = 1 and hasnodata = TRUE
     1512
     1513{{{
     1514ST_Sum('tmin_2009', 'rast')
     1515}}}
     1516
     1517Variations for ST_ApproxSum are:
     1518
     15191. ST_ApproxSum(rastertable text, rastercolumn text, nband int, hasnodata boolean, sample_percent double precision) -> double precision
     1520
     1521{{{
     1522ST_ApproxSum('tmax_2010', 'rast', 1, FALSE, 0.5)
     1523
     1524ST_ApproxSum('precip_2011', 'rast', 1, TRUE, 0.2)
     1525}}}
     1526
     15272. ST_ApproxSum(rastertable text, rastercolumn text, nband int, sample_percent double precision) -> double precision
     1528
     1529    hasnodata = TRUE
     1530
     1531{{{
     1532ST_ApproxSum('tmax_2010', 'rast', 1, 0.5)
     1533
     1534ST_ApproxSum('precip_2011', 'rast', 1, 0.2)
     1535}}}
     1536
     15373. ST_ApproxSum(rastertable text, rastercolumn text, hasnodata boolean, sample_percent double precision) -> double precision
     1538
     1539    nband = 1
     1540
     1541{{{
     1542ST_ApproxSum('tmax_2010', 'rast', FALSE, 0.5)
     1543
     1544ST_ApproxSum('precip_2011', 'rast', TRUE, 0.2)
     1545}}}
     1546
     15474. ST_ApproxSum(rastertable text, rastercolumn text, sample_percent double precision) -> double precision
     1548
     1549    nband = 1 and hasnodata = TRUE
     1550
     1551{{{
     1552ST_ApproxSum('tmax_2010', 'rast', 0.5)
     1553
     1554ST_ApproxSum('precip_2011', 'rast', 0.2)
     1555}}}
     1556
     15575. ST_ApproxSum(rastertable text, rastercolumn text) -> double precision
     1558
     1559    nband = 1, hasnodata = TRUE and sample_percent = 0.1
     1560
     1561{{{
     1562ST_ApproxSum('tmax_2010', 'rast')
     1563
     1564ST_ApproxSum('precip_2011', 'rast')
     1565}}}
     1566
     1567----
     1568
    13911569'''ST_Mean(raster, nband) -> double precision'''[[BR]]
    13921570This function calls ST_SummaryStats and only returns the mean from that function.