Name

ST_Max4ma — Raster processing function that calculates the maximum pixel value in a neighborhood.

Synopsis

float8 ST_Max4ma(float8[][] matrix, text nodatamode, text[] VARIADIC args);

Description

Calculate the maximum pixel value in a neighborhood of pixels.

[Note]

This function is a specialized callback function for use as a callback parameter to ST_MapAlgebraFctNgb.

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_MapAlgebraFctNgb, ST_Min4ma, ST_Sum4ma, ST_Mean4ma, ST_Range4ma, ST_Distinct4ma ST_StdDev4ma