O'Reilly logo

PostGIS Cookbook by Bborie Park, Stephen Vincent Mather, Thomas J. Kraft, Paolo Corti

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Performing advanced map-algebra operations

In a prior recipe, we used the expression-based map-algebra function ST_MapAlgebra() to convert the PRISM pixel values to their true values. The expression-based ST_MapAlgebra() method is easy to use but limited to operating on at most two raster bands. This restricts the ST_MapAlgebra() function's usefulness for processes that require more than two input raster bands, such as Normalized Difference Vegetation Index (NDVI) and Enhanced Vegetation Index (EVI).

There is a variant of ST_MapAlgebra() designed to support an unlimited number of input raster bands. Instead of taking an expression, this ST_MapAlgebra() variant requires a callback function. This callback function is run for each set of input ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required