| 466 | |
| 467 | ---- |
| 468 | |
| 469 | '''ST_StdDev(raster, nband) -> double precision'''[[BR]] |
| 470 | This function calls ST_SummaryStats and only returns the standard deviation from that function. |
| 471 | |
| 472 | 1. ST_StdDev(rast raster, nband int, hasnodata boolean) -> double precision |
| 473 | |
| 474 | returns the standard deviation as a double precision |
| 475 | |
| 476 | nband: index of band |
| 477 | |
| 478 | hasnodata: if FALSE, any pixel who's value is nodata is ignored |
| 479 | |
| 480 | {{{ |
| 481 | ST_StdDev(rast, 1, FALSE) |
| 482 | }}} |
| 483 | |
| 484 | 2. ST_StdDev(rast raster, nband int) -> double precision |
| 485 | |
| 486 | assumes hasnodata = FALSE |
| 487 | |
| 488 | {{{ |
| 489 | ST_StdDev(rast, 2) |
| 490 | }}} |
| 491 | |
| 492 | 3. ST_StdDev(rast raster, hasnodata boolean) -> double precision |
| 493 | |
| 494 | assumes nband = 1 |
| 495 | |
| 496 | {{{ |
| 497 | ST_StdDev(rast, TRUE) |
| 498 | }}} |
| 499 | |
| 500 | 4. ST_StdDev(rast raster) -> double precision |
| 501 | |
| 502 | assumes nband = 1 and hasnodata = FALSE |
| 503 | |
| 504 | {{{ |
| 505 | ST_StdDev(rast) |
| 506 | }}} |
| 507 | |
| 508 | The set of ST_ApproxStdDev functions are: |
| 509 | |
| 510 | 1. ST_ApproxStdDev(rast raster, nband int, hasnodata boolean, sample_percent double precision) -> double precision |
| 511 | |
| 512 | sample_percent: a value between 0 and 1 indicating the percentage of the raster band's pixels to consider |
| 513 | |
| 514 | {{{ |
| 515 | ST_ApproxStdDev(rast, 3, FALSE, 0.1) |
| 516 | |
| 517 | ST_ApproxStdDev(rast, 1, TRUE, 0.5) |
| 518 | }}} |
| 519 | |
| 520 | 2. ST_ApproxStdDev(rast raster, nband int, sample_percent double precision) -> double precision |
| 521 | |
| 522 | assumes that nband = 1 |
| 523 | |
| 524 | {{{ |
| 525 | ST_ApproxStdDev(rast, 2 0.01) |
| 526 | |
| 527 | ST_ApproxStdDev(rast, 4, 0.025) |
| 528 | }}} |
| 529 | |
| 530 | 3. ST_ApproxStdDev(rast raster, hasnodata boolean, sample_percent double precision) -> double precision |
| 531 | |
| 532 | assumes that nband = 1 |
| 533 | |
| 534 | {{{ |
| 535 | ST_ApproxStdDev(rast, FALSE, 0.01) |
| 536 | |
| 537 | ST_ApproxStdDev(rast, TRUE, 0.025) |
| 538 | }}} |
| 539 | |
| 540 | 4. ST_ApproxStdDev(rast raster, sample_percent double precision) -> double precision |
| 541 | |
| 542 | assumes that nband = 1 and hasnodata = FALSE |
| 543 | |
| 544 | {{{ |
| 545 | ST_ApproxStdDev(rast, 0.25) |
| 546 | }}} |
| 547 | |
| 548 | 5. ST_ApproxStdDev(rast raster) -> double precision |
| 549 | |
| 550 | assumes that nband = 1, hasnodata = FALSE and sample_percent = 0.1 |
| 551 | |
| 552 | {{{ |
| 553 | ST_ApproxStdDev(rast) |
| 554 | }}} |
| 555 | |
| 556 | The following functions are provided for coverage tables. |
| 557 | |
| 558 | 1. ST_StdDev(rastertable text, rastercolumn text, nband int, hasnodata boolean) -> double precision |
| 559 | |
| 560 | rastertable: name of table with raster column |
| 561 | |
| 562 | rastercolumn: name of column of data type raster |
| 563 | |
| 564 | {{{ |
| 565 | ST_StdDev('tmax_2010', 'rast', 1, FALSE) |
| 566 | |
| 567 | ST_StdDev('precip_2011', 'rast', 1, TRUE) |
| 568 | }}} |
| 569 | |
| 570 | 2. ST_StdDev(rastertable text, rastercolumn text, nband int) -> double precision |
| 571 | |
| 572 | hasnodata = FALSE |
| 573 | |
| 574 | {{{ |
| 575 | ST_StdDev('tmax_2010', 'rast', 1) |
| 576 | }}} |
| 577 | |
| 578 | 3. ST_StdDev(rastertable text, rastercolumn text, hasnodata boolean) -> double precision |
| 579 | |
| 580 | nband = 1 |
| 581 | |
| 582 | {{{ |
| 583 | ST_StdDev('precip_2011', 'rast', TRUE) |
| 584 | }}} |
| 585 | |
| 586 | 4. ST_StdDev(rastertable text, rastercolumn text) -> double precision |
| 587 | |
| 588 | nband = 1 and hasnodata = FALSE |
| 589 | |
| 590 | {{{ |
| 591 | ST_StdDev('tmin_2009', 'rast') |
| 592 | }}} |
| 593 | |
| 594 | Variations for ST_ApproxStdDev are: |
| 595 | |
| 596 | 1. ST_ApproxStdDev(rastertable text, rastercolumn text, nband int, hasnodata boolean, sample_percent double precision) -> double precision |
| 597 | |
| 598 | {{{ |
| 599 | ST_ApproxStdDev('tmax_2010', 'rast', 1, FALSE, 0.5) |
| 600 | |
| 601 | ST_ApproxStdDev('precip_2011', 'rast', 1, TRUE, 0.2) |
| 602 | }}} |
| 603 | |
| 604 | 2. ST_ApproxStdDev(rastertable text, rastercolumn text, nband int, sample_percent double precision) -> double precision |
| 605 | |
| 606 | hasnodata = FALSE |
| 607 | |
| 608 | {{{ |
| 609 | ST_ApproxStdDev('tmax_2010', 'rast', 1, 0.5) |
| 610 | |
| 611 | ST_ApproxStdDev('precip_2011', 'rast', 1, 0.2) |
| 612 | }}} |
| 613 | |
| 614 | 3. ST_ApproxStdDev(rastertable text, rastercolumn text, hasnodata boolean, sample_percent double precision) -> double precision |
| 615 | |
| 616 | nband = 1 |
| 617 | |
| 618 | {{{ |
| 619 | ST_ApproxStdDev('tmax_2010', 'rast', FALSE, 0.5) |
| 620 | |
| 621 | ST_ApproxStdDev('precip_2011', 'rast', TRUE, 0.2) |
| 622 | }}} |
| 623 | |
| 624 | 4. ST_ApproxStdDev(rastertable text, rastercolumn text, sample_percent double precision) -> double precision |
| 625 | |
| 626 | nband = 1 and hasnodata = FALSE |
| 627 | |
| 628 | {{{ |
| 629 | ST_ApproxStdDev('tmax_2010', 'rast', 0.5) |
| 630 | |
| 631 | ST_ApproxStdDev('precip_2011', 'rast', 0.2) |
| 632 | }}} |
| 633 | |
| 634 | 5. ST_ApproxStdDev(rastertable text, rastercolumn text) -> double precision |
| 635 | |
| 636 | nband = 1, hasnodata = FALSE and sample_percent = 0.1 |
| 637 | |
| 638 | {{{ |
| 639 | ST_ApproxStdDev('tmax_2010', 'rast') |
| 640 | |
| 641 | ST_ApproxStdDev('precip_2011', 'rast') |
| 642 | }}} |
| 643 | |
| 644 | The standard deviation returned in the coverage functions (has rastertable and rastercolumn arguments) is the cumulative standard deviation of all raster tiles. |