From: David Zwarg Date: Wed, 8 Feb 2012 23:59:29 +0000 (+0000) Subject: Added documentation for raster processing builtin functions: st_min4ma, st_max4ma... X-Git-Tag: 2.0.0alpha5~73 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d0b4bdbc26cc22cac11b83078f2287924f6585f;p=postgis Added documentation for raster processing builtin functions: st_min4ma, st_max4ma, st_mean4ma, st_sum4ma, st_range4ma, st_distinct4ma, st_stddev4ma. git-svn-id: http://svn.osgeo.org/postgis/trunk@9124 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference_raster.xml b/doc/reference_raster.xml index dc948c5e6..0d741ef50 100644 --- a/doc/reference_raster.xml +++ b/doc/reference_raster.xml @@ -5413,8 +5413,7 @@ FROM dummy_rast; Description - Returns the hypothetical illumination of a raster band using the azimuth, altitude, brightness, and elevation scale inputs. Utilizes map algebra and - applies the hill shade equation to neighboring pixels. + Returns the hypothetical illumination of a raster band using the azimuth, altitude, brightness, and elevation scale inputs. Utilizes map algebra and applies the hill shade equation to neighboring pixels. The hill shade equation is: max_bright * ( (cos(zenith)*cos(slope)) + (sin(zenith)*sin(slope)*cos(azimuth - aspect)) ). Availability: 2.0.0 @@ -5425,10 +5424,142 @@ FROM dummy_rast; coming soon - + See Also + + + + + + + + ST_Aspect + Returns the surface aspect of an elevation raster band. Useful for analyzing terrain. + + + + + raster ST_Aspect + raster rast + integer band + text pixeltype + + + + + + Description + + Returns the surface aspect of an elevation raster band. Utilizes map algebra and applies the aspect equation to neighboring pixels. + + Given the following representation of a 3x3 neighborhood of pixels: + + + + + + A + B + C + + + D + E + F + + + G + H + I + + + + + + The equation for the pixel aspect of cell E is: atan2((((G + 2H + I) - (A + 2B + C)) / 8), -(((C + 2F + I) - (A + 2D + G)) / 8)) + + Availability: 2.0.0 + + + + + Examples - coming soon + coming soon + + + + + See Also + + + + + + + + + ST_Slope + Returns the surface slope of an elevation raster band. Useful for analyzing terrain. + + + + + raster ST_Slope + raster rast + integer band + text pixeltype + + + + + + Description + + Returns the surface slope of an elevation raster band. Utilizes map algebra and applies the slope equation to neighboring pixels. + + Given the following representation of a 3x3 neighborhood of pixels: + + + + + + A + B + C + + + D + E + F + + + G + H + I + + + + + + The equation for the pixel slope of cell E is: atan(sqrt(((c + 2f + i) - (a + 2d + g) / 8)^2 + (((g + 2h + i) - (a + 2b + c)) / 8) ^ 2)) + + Availability: 2.0.0 + + + + + Examples - coming soon + coming soon + + + + + See Also + + + @@ -6772,6 +6903,436 @@ WHERE ST_Intersects(rast, ST_GeomFromText('LINESTRING(230486 887771, 230500 887 , + + + + Raster Processing Builtin Functions + + + ST_Min4ma + Raster processing function that calculates the minimum pixel value in a neighborhood. + + + + + + float8 ST_Min4ma + float8[][] matrix + string nodatamode + text[] VARIADIC args + + + + + + Description + + Calculate the minimum pixel value in a neighborhood of pixels. + + + This function is a specialized callback function for use as a callback parameter to . + + + Availability: 2.0.0 + + + + Examples + + SELECT + rid, + st_value( + st_mapalgebrafctngb(rast, 1, NULL, 1, 1, 'st_min4ma(float[][],text,text[])'::regprocedure, 'ignore', NULL), 2, 2 + ) +FROM dummy_rast +WHERE rid = 2; + rid | st_value +-----+---------- + 2 | 250 +(1 row) + + + + + + See Also + + , + , + , + , + , + + + + + + + + + ST_Max4ma + Raster processing function that calculates the maximum pixel value in a neighborhood. + + + + + + float8 ST_Max4ma + float8[][] matrix + string nodatamode + text[] VARIADIC args + + + + + + Description + + Calculate the maximum pixel value in a neighborhood of pixels. + + + This function is a specialized callback function for use as a callback parameter to . + + + Availability: 2.0.0 + + + + Examples + + SELECT + rid, + st_value( + st_mapalgebrafctngb(rast, 1, NULL, 1, 1, 'st_max4ma(float[][],text,text[])'::regprocedure, 'ignore', NULL), 2, 2 + ) +FROM dummy_rast +WHERE rid = 2; + rid | st_value +-----+---------- + 2 | 254 +(1 row) + + + + + + See Also + + , + , + , + , + , + + + + + + + + + ST_Sum4ma + Raster processing function that calculates the sum of all pixel values in a neighborhood. + + + + + + float8 ST_Sum4ma + float8[][] matrix + string nodatamode + text[] VARIADIC args + + + + + + Description + + Calculate the sum of all pixel values in a neighborhood of pixels. + + + This function is a specialized callback function for use as a callback parameter to . + + + Availability: 2.0.0 + + + + Examples + + SELECT + rid, + st_value( + st_mapalgebrafctngb(rast, 1, '32BF', 1, 1, 'st_sum4ma(float[][],text,text[])'::regprocedure, 'ignore', NULL), 2, 2 + ) +FROM dummy_rast +WHERE rid = 2; + rid | st_value +-----+---------- + 2 | 2279 +(1 row) + + + + + + See Also + + , + , + , + , + , + + + + + + + + + ST_Mean4ma + Raster processing function that calculates the mean pixel value in a neighborhood. + + + + + + float8 ST_Mean4ma + float8[][] matrix + string nodatamode + text[] VARIADIC args + + + + + + Description + + Calculate the mean pixel value in a neighborhood of pixels. + + + This function is a specialized callback function for use as a callback parameter to . + + + Availability: 2.0.0 + + + + Examples + + SELECT + rid, + st_value( + st_mapalgebrafctngb(rast, 1, '32BF', 1, 1, 'st_mean4ma(float[][],text,text[])'::regprocedure, 'ignore', NULL), 2, 2 + ) +FROM dummy_rast +WHERE rid = 2; + rid | st_value +-----+------------------ + 2 | 253.222229003906 +(1 row) + + + + + + See Also + + , + , + , + , + , + + + + + + + + ST_Range4ma + Raster processing function that calculates the range of pixel values in a neighborhood. + + + + + + float8 ST_Range4ma + float8[][] matrix + string nodatamode + text[] VARIADIC args + + + + + + Description + + Calculate the range of pixel values in a neighborhood of pixels. + + + This function is a specialized callback function for use as a callback parameter to . + + + Availability: 2.0.0 + + + + Examples + + SELECT + rid, + st_value( + st_mapalgebrafctngb(rast, 1, NULL, 1, 1, 'st_range4ma(float[][],text,text[])'::regprocedure, 'ignore', NULL), 2, 2 + ) +FROM dummy_rast +WHERE rid = 2; + rid | st_value +-----+---------- + 2 | 4 +(1 row) + + + + + + See Also + + , + , + , + , + , + + + + + + + + + ST_Distinct4ma + Raster processing function that calculates the number of unique pixel values in a neighborhood. + + + + + + float8 ST_Distinct4ma + float8[][] matrix + string nodatamode + text[] VARIADIC args + + + + + + Description + + Calculate the number of unique pixel values in a neighborhood of pixels. + + + This function is a specialized callback function for use as a callback parameter to . + + + Availability: 2.0.0 + + + + Examples + + SELECT + rid, + st_value( + st_mapalgebrafctngb(rast, 1, NULL, 1, 1, 'st_distinct4ma(float[][],text,text[])'::regprocedure, 'ignore', NULL), 2, 2 + ) +FROM dummy_rast +WHERE rid = 2; + rid | st_value +-----+---------- + 2 | 3 +(1 row) + + + + + + See Also + + , + , + , + , + , + + + + + + + + + ST_StdDev4ma + Raster processing function that calculates the standard deviation of pixel values in a neighborhood. + + + + + + float8 ST_StdDev4ma + float8[][] matrix + string nodatamode + text[] VARIADIC args + + + + + + Description + + Calculate the standard deviation of pixel values in a neighborhood of pixels. + + + This function is a specialized callback function for use as a callback parameter to . + + + Availability: 2.0.0 + + + + Examples + + SELECT + rid, + st_value( + st_mapalgebrafctngb(rast, 1, '32BF', 1, 1, 'st_stddev4ma(float[][],text,text[])'::regprocedure, 'ignore', NULL), 2, 2 + ) +FROM dummy_rast +WHERE rid = 2; + rid | st_value +-----+------------------ + 2 | 1.30170822143555 +(1 row) + + + + + + See Also + + , + , + , + , + , + + + + + +