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
On Tue, Mar 11, 2014 at 4:09 PM, Patrick S. <patrick_GIS@gmx.ch> wrote:
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.
v.net.allpairs does not work properly in GRASS 6. You need to use
GRASS 7 if you want to use this module.
Markus M
#___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
Thanks, Markus.
In that case it would be of advantage to remove this function.
However, before I go for GRASS 7 (which will be harder to host on our Server): The module v.net.allpairs in GRASS 7.0 demands to keep points and lines on different layers, which did not work for me when using PostgreSQL as database. Did I do something wrong, or is this a limitation of GRASS/PostgreSQL?
Patrick
But does
On 03/11/2014 10:39 PM, Markus Neteler wrote:
On Tue, Mar 11, 2014 at 9:01 PM, Markus Metz
<markus.metz.giswork@gmail.com> wrote:
...
v.net.allpairs does not work properly in GRASS 6.
Should we drop it from G6?
You need to use GRASS 7 if you want to use this module.
(we'll hopefully package the tech preview release at the Vienna code
sprint but you can get it from here: http://grass.osgeo.org/grass7/
)
On Wed, Mar 12, 2014 at 10:40 AM, Patrick S. <patrick_GIS@gmx.ch> wrote:
...
Anything we can help with to facilitate the installation of GRASS 7?
Note that you can run both GRASS 6 and 7 in parallel.
I am not a "poweruser" of the servers, so the admin will only run installation from a (stable) repository to guarantee the systems integrity. These servers run on Debian and RedHat. Am I correct that is no GRASS 7.0 repos for those? (http://wiki.osgeo.org/wiki/Enterprise_Linux_GIS)