[GRASSLIST:10624] r.mapcalc problem

Silvia Franceschi silvia.franceschi at ing.unitn.it
Tue Feb 28 04:06:01 EST 2006


Hi all,
I am trying to do a mapcalc between two maps, the first one is a dsm (digital 
surface model) and the second is a dtm (digital terrain model).
The dsm is defined only where there are features on the surface and the dtm is 
defined all over the region.
I would like to fill the holes in the dsm map with the correspondets values of 
the dtm using a mapcalc:

r.mpacalc "new_map=if(dsm,dsm,dtm)"

Using this command I obtain a new map equal to the dsm map.

If I use these instead:

r.mpacalc "new_map=if(dsm!=null(),dsm,dtm)"
r.mpacalc "new_map=if(dsm==null(),dtm,dsm)"

I obtain two maps with all values nan.

Do someone knows the right way to do this mapcalc?

Thanks in advance...

Silvia

-- 
____________________________________________________________________________
HydroloGIS - Environmental Open Source Solutions
Via Siemens, 19
39100 Bolzano
www.hydrologis.com

Silvia Franceschi
Environmental Engineer
tel: +390471068066
mobile:  +393384501332
email: silvia.franceschi at hydrologis.com
____________________________________________________________________________




More information about the grass-user mailing list