Dear list,

I hope you can help me to understand the behavior of GRASS for the following: I need calculate the network-distances for intersections in this network. What seemed easy, starts to get very tricky....

My approach is shown below, but has following problems:

1.) As intersections need to be dedicated with a category, I extraced the intersection-points with v.net so that I can connect them to their network. (is this really needed?) The following execution of the command v.net.allpairs generated errors: I think this might be due to missing categories for the new points? But adding a table, connecting it to the layer and filling in categories resulted in errors concerning already existing attribute tables. Can GRASS handle several layers for one map in PostgreSQL at all?

2.) Exporting and reimporting is a bit hacky, but solves issue 1. After connecting this new pointlayer to the network, I get a map consisting of points and lines in the same layer, as expected by v.net.allpairs. However, I have the feeling that the categories are not distinct, so I have a point and a line with the same cat-values. I expect this to have an effect on v.net.allpairs? The command v.net.allpairs does run (with the code below), but the output is not at all clear: I get the expected number of objects in the table (square of number of points), but the categories start with "1", which is not even existing in my original network. So what will cat "1" stand for than and how can I get v.net.allpairs to use the category of the points in the output?

My code runs on GRASS 6.4.3 from Ubuntu-Repos with PostgreSQL 9.1. as database.

#___network cleaning and extracting intersections connecting to new network
v.build.polylines in=net_clean out=net_segm cats=first --overwrite
v.net in=net_segm out=intersections op=nodes --o
v.out.ogr in=network dsn="network.shp" type=point #re-import to create pt_layer with category
v.in.ogr dsn="network.shp" out=network_pt  type=point
v.net gr_streets_clean points=network_pt op=connect thresh=200 out=network nlayer=1 --o

#___ create o-d-table with costs
v.net.allpairs in=network out=streets_shortpath_od af=cost_speed ab=cost_speed -a --overwrite

I'd appreciate any hint!

Patrick


Patrick Schirmer,
Institute for Transport Planning and Systems
ETH Zürich
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to