[GRASSLIST:5216] Re: mapcalc??

sjors jkwast at freeler.nl
Wed Dec 11 10:42:37 EST 2002


Eric G. Miller wrote:

>On Tue, Dec 10, 2002 at 05:52:23PM +0100, sjors wrote:
>  
>
>>Hi,
>>
>>I've got a rastermap with categories 1-84, not labelled. Now if I use 
>>mapcalc to find everything smaller or equal than 45 it's oke, only 
>>categories 1 thru 45 are there. Now if I want everything bigger than 45 
>>it produces a map with all categories. Is this a bug? BTW I'm using 
>>grass5pre3.
>>    
>>
>
>Please post what you fed r.mapcalc that produced these results.
>
>
>  
>
Hi Eric,

This what I did in mapcalc:

growborder12 = if(growborder4,\
            if(growborder4>=45 && x()<=1899.381324 && 
x()>=1899.381324+((731.532598-1899.381324)/(sqrt((731.532598-1899.381324)^2+(2571.477126-2465.314883)^2)))*1200,1,0))

result is cat 0-77 because of the X coordinates. Need 45-77.
Well I've worked around by substracting >= 45 cat(0-77) with <=45 (cat 
0-45).
Hope it'll give insight,

greetings Sjors




More information about the grass-user mailing list