[GRASS-user] Re: Subtraction of raster maps

Tim Michelsen timmichelsen at gmx-topmail.de
Wed Jun 24 08:26:42 EDT 2009


> > r.mapcalc "newmap = landcover - buildings"
> 
> if I understand right this might work for you, if everything that is not a
> building in your 'buildings' map is no data (null):
> 
> r.mapcalc "newmap = if(isnull(buildings),landcover,null())"
> 
> > The outcome is a map showing only the buildings and no landcover. It also
> > doesn't matter if I change the order in the equation, the result is the same:
> > Only buildings are delivered.
I also hit these recently.
For the ones not used to everyday-mapcalcs:
the correct command shown by Otto creates a mask.
Simply substracting rasters would lead to a value-by-value substraction...

I hope I interpreted this correctly.





More information about the grass-user mailing list