[GRASSLIST:8942] Re: distance algorithim

Hamish hamish_nospam at yahoo.com
Tue Nov 8 20:30:00 EST 2005


> After digging through the man page, the following gives me a list of 
> distances:
> 
> r.mapcalc "area.one=1"
> r.cost -k input=area.one output=distance start_rast=past_sites
> r.mapcalc "distance2=if(isnull(present_sites),null(),distance)"
> r.mapcalc "dist_meters=distance2 * (ewres()+nsres())/2."
> r.stats -1 -n input=dist_meters
> 
> This takes about the same cumalative amount of time as my module, 
> although mine also calculates the angle to the nearest past site for
> each distance and generates moment statistics.

how do the results compare between the two methods? i.e. how good a job
does r.cost do with the knight's move? without?

r.mapcalc residuals=map1-map2
r.univar residuals

sort of thing
?

Hamish




More information about the grass-user mailing list