[GRASSLIST:5804] v.distance help

gcb2101 at columbia.edu gcb2101 at columbia.edu
Wed Feb 16 10:01:44 EST 2005


GRASS users,

I'm trying to measure the distance, along a road network, from
centroids to areas. My input data is:

- vector points imported to GRASS using v.in.ogr with 'centroid'
option
- vector road network imported to grass using v.in.ogr with 'line'
option
- vector polygons (all 'islands') imported to grass using v.in.ogr
with 'boundary' option

All of my attempts either produce a null result (i.e. no output
features), or use a straight-line distance measure. It looks like
v.distance with 'to_along' should work, so I think I'm missing
something. The process I use is as follows:

v.distance -p centroids to=roads from_type=centroid dmax=5.0
out=links upload=dist col=dist

v.patch roads,links,centroids,areas out=net_cents_areas

v.distance -p net_cents_areas to=net_cents_areas from_type=centroid
to_type=area from_layer=1 to_layer=2  out=try1 dmax=.41666667
upload=to_along col=dist

The above results in output of straight-line distance from centroids
to areas. I've tried different 'from-' and 'to_layer' combinations,
and have alternately left the areas as a separate vector; all to no
avail. Any help will be much appreciated.

Incidently, any plans to implement the geodesic calculation in
v.distance? It would be a huge help.

Thanks,

Greg

--
Gregory Booma
CIESIN - Columbia University
http://www.ciesin.columbia.edu




More information about the grass-user mailing list