| 2672 | The following set of function are for coverages. |
| 2673 | |
| 2674 | 1. ST_Histogram(rastertable text, rastercolumn text, nband int DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, bins int default 0, width double precision[] DEFAULT NULL, right boolean DEFAULT FALSE) -> set of records |
| 2675 | |
| 2676 | rastertable: name of table with raster column |
| 2677 | |
| 2678 | rastercolumn: name of column of data type raster |
| 2679 | |
| 2680 | {{{ |
| 2681 | ST_Histogram('tmax_2010', 'rast') |
| 2682 | |
| 2683 | ST_Histogram('precip_2011', 'rast', 1) |
| 2684 | |
| 2685 | ST_Histogram('precip_2011', 'rast', 1, FALSE) |
| 2686 | |
| 2687 | ST_Histogram('precip_2011', 'rast', 1, FALSE, 5) |
| 2688 | |
| 2689 | ST_Histogram('precip_2011', 'rast', 1, FALSE, 10, NULL) |
| 2690 | |
| 2691 | ST_Histogram('precip_2011', 'rast', 1, FALSE, 10, NULL, TRUE) |
| 2692 | }}} |
| 2693 | |
| 2694 | 2. ST_Histogram(rastertable text, rastercolumn text, nband int, exclude_nodata_value boolean, bins int, right boolean) -> set of records |
| 2695 | |
| 2696 | {{{ |
| 2697 | ST_Histogram('tmin_2010', 'rast', 2, FALSE, 5, FALSE) |
| 2698 | }}} |
| 2699 | |
| 2700 | 3. ST_Histogram(rastertable text, rastercolumn text, nband int, bins int, width double precision[] DEFAULT NULL, right boolean DEFAULT FALSE) -> set of records |
| 2701 | |
| 2702 | {{{ |
| 2703 | ST_Histogram('ndvi_2010', 'rast', 1, 5) |
| 2704 | |
| 2705 | ST_Histogram('ndvi_2010', 'rast', 1, 0, ARRAY[0.5]::double precision[]) |
| 2706 | |
| 2707 | ST_Histogram('ndvi_2010', 'rast', 1, 5, NULL, TRUE) |
| 2708 | }}} |
| 2709 | |
| 2710 | 4. ST_Histogram(rastertable text, rastercolumn text, nband int, bins int, right boolean) -> set of records |
| 2711 | |
| 2712 | {{{ |
| 2713 | ST_Histogram('veg_2009', 'rast', 2, 3, FALSE) |
| 2714 | |
| 2715 | ST_Histogram('veg_2009', 'rast', 2, 3, TRUE) |
| 2716 | }}} |
| 2717 | |
| 2718 | A set of functions of ST_ApproxHistogram for coverage tables: |
| 2719 | |
| 2720 | 1. ST_ApproxHistogram(rastertable text, rastercolumn text, nband int DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, sample_percent double precision DEFAULT 0.1, bins int DEFAULT 0, width double precision[] DEFAULT NULL, right boolean DEFAULT FALSE) -> set of records |
| 2721 | |
| 2722 | {{{ |
| 2723 | ST_ApproxHistogram('precip_2010', 'rast') |
| 2724 | |
| 2725 | ST_ApproxHistogram('precip_2010', 'rast', 1) |
| 2726 | |
| 2727 | ST_ApproxHistogram('precip_2010', 'rast', 2, FALSE) |
| 2728 | |
| 2729 | ST_ApproxHistogram('precip_2010', 'rast', 1, TRUE, 0.25) |
| 2730 | |
| 2731 | ST_ApproxHistogram('precip_2010', 'rast', 3, FALSE, 0.2, 10) |
| 2732 | |
| 2733 | ST_ApproxHistogram('precip_2010', 'rast', 1, TRUE, 0.1, 0, ARRAY[1]::double precision[]) |
| 2734 | |
| 2735 | ST_ApproxHistogram('precip_2010', 'rast', 1, TRUE, 0.1, 0, ARRAY[1]::double precision[], FALSE) |
| 2736 | }}} |
| 2737 | |
| 2738 | 2. ST_ApproxHistogram(rastertable text, rastercolumn text, nband int, exclude_nodata_value boolean, sample_percent double precision, bins int, right boolean) |
| 2739 | |
| 2740 | 3. ST_ApproxHistogram(rastertable text, rastercolumn text, nband int, sample_percent double precision) |
| 2741 | |
| 2742 | 4. ST_ApproxHistogram(rastertable text, rastercolumn text, sample_percent double precision) |
| 2743 | |
| 2744 | 5. ST_ApproxHistogram(rastertable text, rastercolumn text, nband int, sample_percent double precision, bins int, width double precision[] DEFAULT NULL, right boolean DEFAULT FALSE) |
| 2745 | |
| 2746 | 6. ST_ApproxHistogram(rastertable text, rastercolumn text, nband int, sample_percent double precision, bins int, right boolean) |
| 2747 | |