[GRASS-user] Maps in a defined region

Ken Mankoff mankoff at gmail.com
Thu Oct 3 06:36:07 PDT 2019

On 2019-10-03 at 15:25 +02, Ondřej Pešek <pesej.ondrek at gmail.com> wrote...
> but r.out.gdal would export "something" from all the maps in the loop,
> wouldn't it? I thought that if I would loop through all my rasters and
> pass them to r.out.gdal, it would create an output for every of them,
> just the ones outside the computational region will be full of no data
> values. I wanted to avoid this export of empty rasters.

In the loop you cant test each raster for some non-null values:

for r in $(g.list...); do
  eval $(r.univar -g ...)
  if [[ ${sum} != 0 ]]; then...


More information about the grass-user mailing list