<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Dear list,<br>
<br>
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....<br>
<br>
My approach is shown below, but has following problems:<br>
<br>
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? <br>
<br>
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?<br>
<br>
My code runs on GRASS 6.4.3 from Ubuntu-Repos with PostgreSQL 9.1.
as database. <br>
<br>
#___network cleaning and extracting intersections connecting to new
network<br>
v.build.polylines in=net_clean out=net_segm cats=first --overwrite <br>
v.net in=net_segm out=intersections op=nodes --o <br>
v.out.ogr in=network dsn="network.shp" type=point #re-import to
create pt_layer with category<br>
v.in.ogr dsn="network.shp" out=network_pt type=point<br>
v.net gr_streets_clean points=network_pt op=connect thresh=200
out=network nlayer=1 --o<br>
<br>
#___ create o-d-table with costs<br>
v.net.allpairs in=network out=streets_shortpath_od af=cost_speed
ab=cost_speed -a --overwrite<br>
<br>
I'd appreciate any hint!<br>
<br>
Patrick<br>
<br>
<br>
<small>Patrick Schirmer, <br>
Institute for Transport Planning and Systems<br>
ETH Zürich</small>
</body>
</html>