[GRASSLIST:4136] Newbie Q re: r.mapcalc

Victor Wren vwren at timension.com
Tue Jul 23 17:03:52 EDT 2002


I have been attempting to go through the Grass Seeds tutorial, and I 
have a feeling I'm missing something very fundamental.  On the route 
cost analysis (which is going to be key to the project I'm working on), 
I'm having an inordinate amount of trouble with what should be an 
absurdly elementary step:

r.mapcalc 'asp_cost = asp_north + asp_south'

asp_north and asp_south are mutually exclusive rasters.  The addition 
of the two results in a raster with all elements equal to "no data"

I have no masks in effect.  I have tried boolean operators 
( asp_cost=if(asp_north,asp_north,asp_south) ), addition of constants, 
anything I can to get past this, with no success -- a "no data" stays "no 
data" no matter what I do to it.  If I combine two maps with non-
overlapping data, all the "no data" cells combine, resulting in an empty 
map.  Best I can manage is getting asp_cost to equal asp_north OR 
asp_south, but not both combined.

Does anybody have any suggestions as to what I might be doing 
wrong, or what I could try?  I'm using Grass5, but I don't have the 
version in front of me.

Thanks for any assistance,
Victor Wren



More information about the grass-user mailing list