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

Facundo Muñoz famuvie at alumni.uv.es
Wed Nov 12 13:46:59 EST 2008


I've implemented exactly the same idea as yours in this script:
http://www.geeitema.org/doc/guenmap//docs/v.costdist.mat.zip

...with the particularity that it stores the computed distances in the 
attribute table of the second set of cities, which was needed for my 
application.
You can try it, and see if it works for you.

Regards!
ƒacu.-

#
# Description:
# v.costdist.mat determines de cumulative cost of moving between each 
pair of points
# from two given maps over a cost surface
# e.g.
# - obtaining the "true" distance matrix of a set of noise measures in a 
city
# considering buildings as non-transparent areas for sound
#
# Notes:
# Results are stored as new columns in "to" map's attributes tables
# Try and keep the number of input sites to under a few dozen, as the
# process is very computationally expensive. You might consider creating
# a few hundred MB RAM-disk for a temporary mapset to avoid thrashing your
# hard drive (r.cost is heavy on disk IO).



Moritz Lennert escribió:
> 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
>
> _______________________________________________
> grass-user mailing list
> grass-user en lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>


More information about the grass-user mailing list