Changes between Version 78 and Version 79 of WKTRaster/SpecificationWorking03
- Timestamp:
- 05/16/11 11:22:48 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WKTRaster/SpecificationWorking03
v78 v79 647 647 648 648 '''ST_MinMax(raster, nband) -> record'''[[BR]] 649 As part of the process to provide complete implementations of ST_AsJPEG and ST_AsPNG, a method is required to reclassify larger numbers unable to be contained in 8BUI (JPEG and PNG) and 16BUI (PNG). For this reclassification function, we need to get the min and max values of a band, thus ST_MinMax. This function calls upon ST_SummaryStats.649 This function calls ST_SummaryStats and only returns the min and max values from that function. 650 650 651 651 1. ST_MinMax(rast raster, nband int, hasnodata boolean) -> record 652 652 653 returns one record of two columns (min, max)654 655 nband: index of band to process on656 657 hasnodata: if FALSE, any pixel who's value is nodata is ignored .658 659 {{{ 660 ST_MinMax(rast, 2, TRUE)653 returns the record (min double precision, max double precision) 654 655 nband: index of band 656 657 hasnodata: if FALSE, any pixel who's value is nodata is ignored 658 659 {{{ 660 ST_MinMax(rast, 1, FALSE) 661 661 }}} 662 662 … … 671 671 3. ST_MinMax(rast raster, hasnodata boolean) -> record 672 672 673 assumes band index= 1674 675 {{{ 676 ST_MinMax(rast, FALSE)673 assumes nband = 1 674 675 {{{ 676 ST_MinMax(rast, TRUE) 677 677 }}} 678 678 679 679 4. ST_MinMax(rast raster) -> record 680 680 681 assumes band index= 1 and hasnodata = FALSE681 assumes nband = 1 and hasnodata = FALSE 682 682 683 683 {{{ … … 685 685 }}} 686 686 687 The ST_ApproxMinMax functions are:688 689 1. ST_ApproxMinMax(rast raster, nband int, hasnodata boolean, sample_percent double precision) -> record690 691 sample_percent: a value between 0 and 1 indicating the percentage of the raster band's pixels to consider when determining the min/max pair.687 The set of ST_ApproxMinMax functions are: 688 689 1. ST_ApproxMinMax(rast raster, nband int, hasnodata boolean, sample_percent record) -> record 690 691 sample_percent: a value between 0 and 1 indicating the percentage of the raster band's pixels to consider 692 692 693 693 {{{ … … 733 733 }}} 734 734 735 ---- 735 The following functions are provided for coverage tables. 736 737 1. ST_MinMax(rastertable text, rastercolumn text, nband int, hasnodata boolean) -> record 738 739 rastertable: name of table with raster column 740 741 rastercolumn: name of column of data type raster 742 743 {{{ 744 ST_MinMax('tmax_2010', 'rast', 1, FALSE) 745 746 ST_MinMax('precip_2011', 'rast', 1, TRUE) 747 }}} 748 749 2. ST_MinMax(rastertable text, rastercolumn text, nband int) -> record 750 751 hasnodata = FALSE 752 753 {{{ 754 ST_MinMax('tmax_2010', 'rast', 1) 755 }}} 756 757 3. ST_MinMax(rastertable text, rastercolumn text, hasnodata boolean) -> record 758 759 nband = 1 760 761 {{{ 762 ST_MinMax('precip_2011', 'rast', TRUE) 763 }}} 764 765 4. ST_MinMax(rastertable text, rastercolumn text) -> record 766 767 nband = 1 and hasnodata = FALSE 768 769 {{{ 770 ST_MinMax('tmin_2009', 'rast') 771 }}} 772 773 Variations for ST_ApproxMinMax are: 774 775 1. ST_ApproxMinMax(rastertable text, rastercolumn text, nband int, hasnodata boolean, sample_percent double precision) -> record 776 777 {{{ 778 ST_ApproxMinMax('tmax_2010', 'rast', 1, FALSE, 0.5) 779 780 ST_ApproxMinMax('precip_2011', 'rast', 1, TRUE, 0.2) 781 }}} 782 783 2. ST_ApproxMinMax(rastertable text, rastercolumn text, nband int, sample_percent double precision) -> record 784 785 hasnodata = FALSE 786 787 {{{ 788 ST_ApproxMinMax('tmax_2010', 'rast', 1, 0.5) 789 790 ST_ApproxMinMax('precip_2011', 'rast', 1, 0.2) 791 }}} 792 793 3. ST_ApproxMinMax(rastertable text, rastercolumn text, hasnodata boolean, sample_percent double precision) -> record 794 795 nband = 1 796 797 {{{ 798 ST_ApproxMinMax('tmax_2010', 'rast', FALSE, 0.5) 799 800 ST_ApproxMinMax('precip_2011', 'rast', TRUE, 0.2) 801 }}} 802 803 4. ST_ApproxMinMax(rastertable text, rastercolumn text, sample_percent double precision) -> record 804 805 nband = 1 and hasnodata = FALSE 806 807 {{{ 808 ST_ApproxMinMax('tmax_2010', 'rast', 0.5) 809 810 ST_ApproxMinMax('precip_2011', 'rast', 0.2) 811 }}} 812 813 5. ST_ApproxMinMax(rastertable text, rastercolumn text) -> record 814 815 nband = 1, hasnodata = FALSE and sample_percent = 0.1 816 817 {{{ 818 ST_ApproxMinMax('tmax_2010', 'rast') 819 820 ST_ApproxMinMax('precip_2011', 'rast') 821 }}} 822 823 ---- 824 736 825 '''ST_AsJPEG(raster, quality) -> JPEG as "bytea"'''[[BR]] 737 826 Return the raster as a JPEG encoded as a PostgreSQL bytea. By default quality is set to 75, but this option can be used to select other values. Values must be in the range 10-100. Low values result in higher compression ratios, but poorer image quality. Values above 95 are not meaningfully better quality but can but substantially larger. (copied from http://www.gdal.org/frmt_jpeg.html)