We want to apply classic mathematical morphology operations in Raster objects. A typical Raster-GIS implements Map Algebra, like PostGIS's ST_MapAlgebra_expr.
"Focal operations" of the Map Algebra tool-kit seems close to the mathematical morphology operations... But is it? Can I reproduce all mathematical morphology operations with Map Algebra?
Main operation examples: Erosion and Dilation, that are like the vectorial counterpart ST_Buffer (positive and negative).
If the main answer is "YES", can you show examples of Erosion and Dilation with the ST_MapAlgebra_expr()
function? It is not obvious and the Guide not show examples.