[GRASS-dev] vector network questions

Moritz Lennert mlennert at club.worldonline.be
Fri Oct 5 02:34:58 PDT 2012


On 05/10/12 07:37, Michael Barton wrote:
> Why does mouse querying of a vector network return "nothing found"?
> There is attribute data in the associated attribute table. (GRASS 7 svn,
> on Mac).

A vector network is just normal vector data, so if you get a "nothing 
found" then there is a problem.

>
> I thought I'd go over this in class tomorrow, but I can't follow the
> manual. It is not clear how to transform a vector map (e.g., roadsmajor
> of the nc_08 data set) into a network. Run v.net <http://v.net> with
> nodes? connect? arcs? some combination?

The way the v.net.* modules are implemented, in order to be able to do 
network analysis with a network and specific nodes, you have to run 
v.net with operation connect (and a relevant threshold), connecting the 
nodes you are interested in with the network in a topologically correct way.

I guess it might be worth to develop some scripted fronted which allows 
you to just provide separate layers for network and nodes and the 
network analysis you want to do, and then the script does the v.net part 
for you. But for now you have to do this first. And from a pedagogical 
point of view I find it important to show the need for topologically 
correct data.

>
> v.net <http://v.net> path instructions seem to date from earliest GRASS
> 6 days and are for linux based terminal commands, pipe and stdin. It is
> not clear how to even enter start and end points. Or perhaps the
> interactive points entry control is broken. I can't tell.

I have no problems entering points interactively in Debian Squeeze with 
6.4.2.

Here's an example with the NC data set:

v.net input=streets_wake at PERMANENT points=schools_wake at PERMANENT 
output=streets_schools operation=connect thresh=100

Interactive use of v.net.path in GUI gives following command line:
v.net.path --overwrite input=streets_schools at user1 output=paths 
file=/home/mlennert/GRASS/DATA/nc_spm_08/user1/.tmp/geog-pc40/30065.1
(I entered the following into the interactive text field:

1 1 167
2 3 166
3 656688 234205 629030 217772

The same could be put into a text file called with the file= option. 
Often a good idea for students so that you can debug...).

Screenshot of the different GUI windows of the operation:

http://164.15.12.207/grass/v_net_path.png

> I'm interested to know how this works. Perhaps I can work with someone
> to update the docs.

At this stage, I don't really understand what is missing in the docs. 
Screenshots of GUI usage ?

Moritz




More information about the grass-dev mailing list