[GRASS-user] how to measure distances in a constrained space

Moritz Lennert mlennert at club.worldonline.be
Wed Nov 12 13:06:01 EST 2008


Hello,

I would like to measure distances between points in a constrained space, 
such as distances between cities, but only taking into account distances 
by land, and so excluding any water bodies. Concretely, this means 
finding those cities in a first set of cities which are at least 150km 
from the nearest city in the a second set of cities.

At this stage, I only see the possibility of creating a cost surface 
with cell values on land masses equal to the resolution and null cells 
on water masses and then using r.cost with null_cost set to a very high 
level and start_points to the second set of cities, then v.what.rast to 
sample the result at the location of the cities of the first set. Does 
that sound reasonable ? At the moment I'm getting very weird values, but 
I'll have to double-check my operations.

Does anyone see a way of doing this with vector operations ?

Moritz



More information about the grass-user mailing list