[GRASSLIST:8926] Re: distance algorithim
Hamish
hamish_nospam at yahoo.com
Tue Nov 8 02:10:24 EST 2005
> From the r.distance page:
> "Locates the closest points between "objects" in two raster maps. An
> "object" is defined as all the grid cells that have the same category
> number, and closest means having the shortest "straight-line"
> distance."
>
> Unless I give every cell a unique category r.distance isn't suitable.
> I also calculate a statistics based on the distances as my module
> runs.
>
> As an update - the described algorithm does work pretty fast. I hadn't
> "make installed" my changes so my tweaks weren't actually being used.
> Doh.
>
> Perhaps I should alter r.distance to allow for this alternative
> behaviour? Does this sound useful to anyone?
what about r.cost with a cost map of solid ones? (r.mapcalc one=1)
Then multiply answer by map resolution to get a "distance from" map.
Does the -k flag fix the distance-to-diagonals problem in this case?
Hamish
More information about the grass-user
mailing list