[GRASS-user] Check for non-overlapping raster maps

Hi,

I have a mapset with 44 raster maps. I want to check that they do NOT have overlapping data areas. My thought is to do something like:

r.mapcalc "checkmap=isnull(map1) + isnull(map2) + ... + isnull(map44)"

If the min value of the resulting checkmap is 43, then I know that the maps are non-overlapping.

Is there a smarter way of doing the test ?

Thanks in advance, Hermann

Hermann Peifer wrote:

I have a mapset with 44 raster maps. I want to check that they do NOT
have overlapping data areas. My thought is to do something like:

r.mapcalc "checkmap=isnull(map1) + isnull(map2) + ... + isnull(map44)"

If the min value of the resulting checkmap is 43, then I know that the
maps are non-overlapping.

Is there a smarter way of doing the test ?

  r.series method=count

--
Glynn Clements <glynn@gclements.plus.com>

On 12/08/2011 08:52, Glynn Clements wrote:

Hermann Peifer wrote:

I have a mapset with 44 raster maps. I want to check that they do NOT
have overlapping data areas. My thought is to do something like:

r.mapcalc "checkmap=isnull(map1) + isnull(map2) + ... + isnull(map44)"

If the min value of the resulting checkmap is 43, then I know that the
maps are non-overlapping.

Is there a smarter way of doing the test ?

  r.series method=count

Thanks. This is what I was looking for, but obviously not able to find it myself :frowning:

Hermann

On Fri, Aug 12, 2011 at 12:49 PM, Hermann Peifer <peifer@gmx.eu> wrote:

On 12/08/2011 08:52, Glynn Clements wrote:

Hermann Peifer wrote:

I have a mapset with 44 raster maps. I want to check that they do NOT
have overlapping data areas.

...

   r\.series method=count

Thanks. This is what I was looking for, but obviously not able to find it
myself :frowning:

Hermann, if you have any ideas to better communicate things, please
let us know!

thanks
Markus

On 12/08/2011 23:14, Markus Neteler wrote:

On Fri, Aug 12, 2011 at 12:49 PM, Hermann Peifer<peifer@gmx.eu> wrote:

On 12/08/2011 08:52, Glynn Clements wrote:

Hermann Peifer wrote:

I have a mapset with 44 raster maps. I want to check that they do NOT
have overlapping data areas.

...

        r.series method=count

Thanks. This is what I was looking for, but obviously not able to find it
myself :frowning:

Hermann, if you have any ideas to better communicate things, please
let us know!

thanks
Markus

Markus, in the above case it was my own plain stupidity to not consider r.series. The only idea I have is to think harder before bothering the list with trivial questions.

Where I would see (perhaps) a small deficit in the communication or documentation is a simple overview about which (raster) modules respect the current region and resolution, and which don't. The issue went over the list [1], but as far as I can see: the documentation did not change [2].

Hermann

[1]
http://lists.osgeo.org/pipermail/grass-user/2010-September/057988.html

[2]
http://grass.osgeo.org/grass64/manuals/html64_user/g.region.html

Hermann wrote:

Where I would see (perhaps) a small deficit in the
communication or documentation is a simple overview about which
(raster) modules respect the current region and resolution, and
which don't. The issue went over the list [1], but as far as I
can see: the documentation did not change [2].

...

[1]
http://lists.osgeo.org/pipermail/grass-user/2010-September/057988.html

[2]
http://grass.osgeo.org/grass64/manuals/html64_user/g.region.html

the text probably belongs in here:

  http://grass.osgeo.org/grass64/manuals/html64_user/rasterintro.html

thanks,
Hamish

On 13/08/2011 07:12, Hamish wrote:

Hermann wrote:

Where I would see (perhaps) a small deficit in the
communication or documentation is a simple overview about which
(raster) modules respect the current region and resolution, and
which don't. The issue went over the list [1], but as far as I
can see: the documentation did not change [2].

...

[1]
http://lists.osgeo.org/pipermail/grass-user/2010-September/057988.html

[2]
http://grass.osgeo.org/grass64/manuals/html64_user/g.region.html

the text probably belongs in here:

   http://grass.osgeo.org/grass64/manuals/html64_user/rasterintro.html

This might also be a good place. Actually, any place is better than no place :wink:

From my time as absolute GRASS beginner (which isn't too far away), I do remember that I asked myself: will r.reclass, r.mask, r.in.gdal, r.category, .. make use of the current region and resolution, or not?

Hermann

Markus Neteler wrote:

>>> I have a mapset with 44 raster maps. I want to check that they do NOT
>>> have overlapping data areas.
...
>> r.series method=count
>>
>
> Thanks. This is what I was looking for, but obviously not able to find it
> myself :frowning:

Hermann, if you have any ideas to better communicate things, please
let us know!

It might be worth adding something to the r.mapcalc manpage.

--
Glynn Clements <glynn@gclements.plus.com>