[GRASS-user] increase efficiency of analysis with r.grow.distance aka Euclidean allocation

Hi All,

I am working on a project that requires to find the middle boundary between raster regions (of the same value) using a maximum buffer distance. The raster input I am using is quite large like 5m resolution and 100000 by 100000 cells. One approach I took was to fill all cells in areas outside the raster regions in question which I will need to buffer to NULL
and then using the r.grow.distance in GRASS (similar to the Tool Euclidean allocation in ArcGIS).

This works with smaller files but with a big input like the one above calculation time is very long or might crash even on a fast PC. The only remedy I found (apart from throwing larger RAM or hardware at the task)
so far was cutting up the raster file in tiles and running the analysis on each tile and putting the results back afterwards to get to final result layer.

Would anyone have hints if there are other approaches that I could increase the efficiency of this analysis in GRASS or have any knowledge of other tool sets such as R or python scripts that are already available for something like this ?

Cheers
Karsten

Karsten Vennemann
www.terragis.net

Am 29. Januar 2021 01:30:03 GMT+00:00 schrieb karsten <karsten@terragis.net>:

Hi All,

I am working on a project that requires to find the middle boundary between
raster regions (of the same value) using a maximum buffer distance. The
raster input I am using is quite large like 5m resolution and 100000 by
100000 cells. One approach I took was to fill all cells in areas outside the
raster regions in question which I will need to buffer to NULL
and then using the r.grow.distance in GRASS (similar to the Tool Euclidean
allocation in ArcGIS).

This works with smaller files but with a big input like the one above
calculation time is very long or might crash even on a fast PC. The only
remedy I found (apart from throwing larger RAM or hardware at the task)
so far was cutting up the raster file in tiles and running the analysis on
each tile and putting the results back afterwards to get to final result
layer.

Would anyone have hints if there are other approaches that I could increase
the efficiency of this analysis in GRASS or have any knowledge of other tool
sets such as R or python scripts that are already available for something
like this ?

Working tile by tile allows you to parallelize the processes, and so treat several tiles at once. Obviously tiling does raise the issue of the border regions, so sufficient overlap will be necessary.

Moritz

Moritz