Multiple v.net.path parameters

13 messages Options
Embed this post
Permalink
J. Holden

Multiple v.net.path parameters

Reply Threaded More More options
Print post
Permalink

Hello,

I am looking to use v.net.path to determine the distance of many different points to many different other points on a network.

Is it possible to send multiple parameters to v.net.path? For instance, I have (in theory) 4 points connected to a network. I want to find the distance of the line segments between points 1 and 4, 2 and 4, & 3 and 4.

I want to:
run v.net.path once by passing multiple parameters;
get vector line output of each of these three paths found by v.net.path in one output file;
calculate the distance of each line from the file using v.to.db.

Since this is not a module of GRASS which I have worked with in the past, I am wondering if this is possible.

Thanks
John


     
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
hamish-2

Re: Multiple v.net.path parameters

Reply Threaded More More options
Print post
Permalink

J. Holden wrote:
> I am looking to use v.net.path to determine the distance of
> many different points to many different other points on a
> network.
>
> Is it possible to send multiple parameters to v.net.path?
> For instance, I have (in theory) 4 points connected to a
> network. I want to find the distance of the line segments
> between points 1 and 4, 2 and 4, & 3 and 4.

run 3 times and then combine with v.patch?

> I want to:
> run v.net.path once by passing multiple parameters;
> get vector line output of each of these three paths found
> by v.net.path in one output file;
> calculate the distance of each line from the file using
> v.to.db.
>
> Since this is not a module of GRASS which I have worked
> with in the past, I am wondering if this is possible.

IIUC something like this has newly been worked on as part of the
Google Summer of Code project by Daniel Bundala.

http://grass.osgeo.org/wiki/GSoC_Network_Analysis


you might want to contact him and act as a beta tester for his
new modules. (find him on the OSGeo SoC mailing list)


Hamish



     

_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
J. Holden

Re: Multiple v.net.path parameters

Reply Threaded More More options
Print post
Permalink
In reply to this post by J. Holden

Well, I will have a database with thousands of points and I don't want to create thousands of vector files. Plus, I'm worried I will lose the length data if I use v.patch, which is what I am most interested in.

I will contact Daniel. Thanks for the tip.

Cheers,
John

--- On Tue, 6/30/09, Hamish <[hidden email]> wrote:

> From: Hamish <[hidden email]>
> Subject: Re: [GRASS-user] Multiple v.net.path parameters
> To: [hidden email], "J. Holden" <[hidden email]>
> Date: Tuesday, June 30, 2009, 8:01 PM
>
> J. Holden wrote:
> > I am looking to use v.net.path to determine the
> distance of
> > many different points to many different other points
> on a
> > network.
> >
> > Is it possible to send multiple parameters to
> v.net.path?
> > For instance, I have (in theory) 4 points connected to
> a
> > network. I want to find the distance of the line
> segments
> > between points 1 and 4, 2 and 4, & 3 and 4.
>
> run 3 times and then combine with v.patch?
>
> > I want to:
> > run v.net.path once by passing multiple parameters;
> > get vector line output of each of these three paths
> found
> > by v.net.path in one output file;
> > calculate the distance of each line from the file
> using
> > v.to.db.
> >
> > Since this is not a module of GRASS which I have
> worked
> > with in the past, I am wondering if this is possible.
>
> IIUC something like this has newly been worked on as part
> of the
> Google Summer of Code project by Daniel Bundala.
>
> http://grass.osgeo.org/wiki/GSoC_Network_Analysis
>
>
> you might want to contact him and act as a beta tester for
> his
> new modules. (find him on the OSGeo SoC mailing list)
>
>
> Hamish
>
>
>
>      
>
>



_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Moritz Lennert

Re: Multiple v.net.path parameters

Reply Threaded More More options
Print post
Permalink
In reply to this post by J. Holden
On 01/07/09 04:44, J. Holden wrote:

> Hello,
>
> I am looking to use v.net.path to determine the distance of many
> different points to many different other points on a network.
>
> Is it possible to send multiple parameters to v.net.path? For
> instance, I have (in theory) 4 points connected to a network. I want
> to find the distance of the line segments between points 1 and 4, 2
> and 4, & 3 and 4.
>
> I want to: run v.net.path once by passing multiple parameters; get
> vector line output of each of these three paths found by v.net.path
> in one output file; calculate the distance of each line from the file
> using v.to.db.
>
> Since this is not a module of GRASS which I have worked with in the
> past, I am wondering if this is possible.

Sure, as mentioned on the man page:

"Nodes can be piped into the program from file or from stdin. The syntax
is as follows:

id start_point_category end_point_category

or

id start_point_x start_point_y end_point_x end_point_y"


So to take your example, and assuming that 1,2,3,4 are category values
of existing points:

Create a file containing:

1 1 4
2 2 4
3 3 4

and feed it to v.net.path with the file= parameter.

You will then get one vector map with severals lines which have the
category values used in the first column of your file.

Moritz
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Daniel Bundala

Re: Multiple v.net.path parameters

Reply Threaded More More options
Print post
Permalink
Hello all,

I have finished v.net.distance module as a part of my Google Summer of
Code project. The (source code of) module can be downloaded from grass
add-ons repository (vector/net.analyze). I recommend to download the
entire directory to avoid any compilation issues. Additionally, you
get an access to some latest network analysis modules! Anyway, simple
make command in the net.analyze directory should compile the modules
(and library). There is no documentation (yet), however, the interface
should be similar to the one used in v.net.path and/or v.distance.
Finally, here is a couple of nice pictures:

http://people.ksp.sk/~dano/grass/nd.png
http://people.ksp.sk/~dano/grass/ndt.png
http://people.ksp.sk/~dano/grass/ndtd.png

Blue and orange lines show the shortest length and time paths respectively.

Best,
Daniel

On Wed, Jul 1, 2009 at 5:56 PM, Moritz
Lennert<[hidden email]> wrote:

> On 01/07/09 04:44, J. Holden wrote:
>>
>> Hello,
>>
>> I am looking to use v.net.path to determine the distance of many
>> different points to many different other points on a network.
>>
>> Is it possible to send multiple parameters to v.net.path? For
>> instance, I have (in theory) 4 points connected to a network. I want
>> to find the distance of the line segments between points 1 and 4, 2
>> and 4, & 3 and 4.
>>
>> I want to: run v.net.path once by passing multiple parameters; get
>> vector line output of each of these three paths found by v.net.path
>> in one output file; calculate the distance of each line from the file
>> using v.to.db.
>>
>> Since this is not a module of GRASS which I have worked with in the
>> past, I am wondering if this is possible.
>
> Sure, as mentioned on the man page:
>
> "Nodes can be piped into the program from file or from stdin. The syntax is
> as follows:
>
> id start_point_category end_point_category
>
> or
>
> id start_point_x start_point_y end_point_x end_point_y"
>
>
> So to take your example, and assuming that 1,2,3,4 are category values of
> existing points:
>
> Create a file containing:
>
> 1 1 4
> 2 2 4
> 3 3 4
>
> and feed it to v.net.path with the file= parameter.
>
> You will then get one vector map with severals lines which have the category
> values used in the first column of your file.
>
> Moritz
> _______________________________________________
> grass-user mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Moritz Lennert

Re: Multiple v.net.path parameters

Reply Threaded More More options
Print post
Permalink
On 08/07/09 21:09, Daniel Bundala wrote:
> Hello all,
>
> I have finished v.net.distance module as a part of my Google Summer of
> Code project.

Great work !! I'll test as soon as I have a bit more time.

Moritz
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
achim

Re: Multiple v.net.path parameters

Reply Threaded More More options
Print post
Permalink
In reply to this post by Daniel Bundala
Hello Daniel (and others),

I ran the module successfully, but only with a network, where every line
ends with the next node.

In attached example it is possible to calc path from 1 to 4 and from 5
to 6, but not from 1 to 2,3,5,6 or from 5 to anywhere expect 6 and so on.

Do you have an idea how to handle this?

Especially: do you know if "breaking the lines" (eg. dark green one at
point 5) is possible with networking techniques?

Sorry for asking you directly, but I hopefully thought you are deep
inside the topic at the moment.

Thanks anyway for your work!
Achim



Daniel Bundala schrieb

> Hello all,
>
> I have finished v.net.distance module as a part of my Google Summer of
> Code project. The (source code of) module can be downloaded from grass
> add-ons repository (vector/net.analyze). I recommend to download the
> entire directory to avoid any compilation issues. Additionally, you
> get an access to some latest network analysis modules! Anyway, simple
> make command in the net.analyze directory should compile the modules
> (and library). There is no documentation (yet), however, the interface
> should be similar to the one used in v.net.path and/or v.distance.
> Finally, here is a couple of nice pictures:
>
> http://people.ksp.sk/~dano/grass/nd.png
> http://people.ksp.sk/~dano/grass/ndt.png
> http://people.ksp.sk/~dano/grass/ndtd.png
>
> Blue and orange lines show the shortest length and time paths respectively.
>
> Best,
> Daniel
>
> On Wed, Jul 1, 2009 at 5:56 PM, Moritz
> Lennert<[hidden email]> wrote:
>> On 01/07/09 04:44, J. Holden wrote:
>>> Hello,
>>>
>>> I am looking to use v.net.path to determine the distance of many
>>> different points to many different other points on a network.
>>>
>>> Is it possible to send multiple parameters to v.net.path? For
>>> instance, I have (in theory) 4 points connected to a network. I want
>>> to find the distance of the line segments between points 1 and 4, 2
>>> and 4, & 3 and 4.
>>>
>>> I want to: run v.net.path once by passing multiple parameters; get
>>> vector line output of each of these three paths found by v.net.path
>>> in one output file; calculate the distance of each line from the file
>>> using v.to.db.
>>>
>>> Since this is not a module of GRASS which I have worked with in the
>>> past, I am wondering if this is possible.
>> Sure, as mentioned on the man page:
>>
>> "Nodes can be piped into the program from file or from stdin. The syntax is
>> as follows:
>>
>> id start_point_category end_point_category
>>
>> or
>>
>> id start_point_x start_point_y end_point_x end_point_y"
>>
>>
>> So to take your example, and assuming that 1,2,3,4 are category values of
>> existing points:
>>
>> Create a file containing:
>>
>> 1 1 4
>> 2 2 4
>> 3 3 4
>>
>> and feed it to v.net.path with the file= parameter.
>>
>> You will then get one vector map with severals lines which have the category
>> values used in the first column of your file.
>>
>> Moritz
>> _______________________________________________
>> grass-user mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>
> _______________________________________________
> grass-user mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
achim

Multiple v.net.path parameters

Reply Threaded More More options
Print post
Permalink
..with attachment

Hello Daniel (and others),

I ran the module successfully, but only with a network, where every line
ends with the next node.

In attached example it is possible to calc path from 1 to 4 and from 5
to 6, but not from 1 to 2,3,5,6 or from 5 to anywhere expect 6 and so on.

Do you have an idea how to handle this?

Especially: do you know if "breaking the lines" (eg. dark green one at
point 5) is possible with networking techniques?

Sorry for asking you directly, but I hopefully thought you are deep
inside the topic at the moment.

Thanks anyway for your work!
Achim



Daniel Bundala schrieb

> > Hello all,
> >
> > I have finished v.net.distance module as a part of my Google Summer of
> > Code project. The (source code of) module can be downloaded from grass
> > add-ons repository (vector/net.analyze). I recommend to download the
> > entire directory to avoid any compilation issues. Additionally, you
> > get an access to some latest network analysis modules! Anyway, simple
> > make command in the net.analyze directory should compile the modules
> > (and library). There is no documentation (yet), however, the interface
> > should be similar to the one used in v.net.path and/or v.distance.
> > Finally, here is a couple of nice pictures:
> >
> > http://people.ksp.sk/~dano/grass/nd.png
> > http://people.ksp.sk/~dano/grass/ndt.png
> > http://people.ksp.sk/~dano/grass/ndtd.png
> >
> > Blue and orange lines show the shortest length and time paths
respectively.

> >
> > Best,
> > Daniel
> >
> > On Wed, Jul 1, 2009 at 5:56 PM, Moritz
> > Lennert<[hidden email]> wrote:
>> >> On 01/07/09 04:44, J. Holden wrote:
>>> >>> Hello,
>>> >>>
>>> >>> I am looking to use v.net.path to determine the distance of many
>>> >>> different points to many different other points on a network.
>>> >>>
>>> >>> Is it possible to send multiple parameters to v.net.path? For
>>> >>> instance, I have (in theory) 4 points connected to a network. I want
>>> >>> to find the distance of the line segments between points 1 and 4, 2
>>> >>> and 4, & 3 and 4.
>>> >>>
>>> >>> I want to: run v.net.path once by passing multiple parameters; get
>>> >>> vector line output of each of these three paths found by v.net.path
>>> >>> in one output file; calculate the distance of each line from the
file
>>> >>> using v.to.db.
>>> >>>
>>> >>> Since this is not a module of GRASS which I have worked with in the
>>> >>> past, I am wondering if this is possible.
>> >> Sure, as mentioned on the man page:
>> >>
>> >> "Nodes can be piped into the program from file or from stdin. The
syntax is

>> >> as follows:
>> >>
>> >> id start_point_category end_point_category
>> >>
>> >> or
>> >>
>> >> id start_point_x start_point_y end_point_x end_point_y"
>> >>
>> >>
>> >> So to take your example, and assuming that 1,2,3,4 are category
values of

>> >> existing points:
>> >>
>> >> Create a file containing:
>> >>
>> >> 1 1 4
>> >> 2 2 4
>> >> 3 3 4
>> >>
>> >> and feed it to v.net.path with the file= parameter.
>> >>
>> >> You will then get one vector map with severals lines which have
the category

>> >> values used in the first column of your file.
>> >>
>> >> Moritz
>> >> _______________________________________________
>> >> grass-user mailing list
>> >> [hidden email]
>> >> http://lists.osgeo.org/mailman/listinfo/grass-user
>> >>
> > _______________________________________________
> > grass-user mailing list
> > [hidden email]
> > http://lists.osgeo.org/mailman/listinfo/grass-user


_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user

path.jpg (21K) Download Attachment
hamish-2

Re: Multiple v.net.path parameters

Reply Threaded More More options
Print post
Permalink
achim wrote:
> In attached example it is possible to calc path from 1 to 4
> and from 5 to 6, but not from 1 to 2,3,5,6 or from 5 to anywhere
> expect 6 and so on.
>
> Do you have an idea how to handle this?
>
> Especially: do you know if "breaking the lines" (eg. dark
> green one at point 5) is possible with networking techniques?


from the image the little "+"s indicate there are nodes at all
intersections, so there is nothing to break really. (unless there
are two lines on top of each other, in which case you can do v.clean
remove duplicates tool)

if you want each line to have it's own color/cat use v.category option
to remove all cat numbers then again to add new ones sequentially. you
might have to do that in another column and then change the key column
to the new one with v.reclass.


Hamish



     

_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
achim

Re: Multiple v.net.path parameters

Reply Threaded More More options
Print post
Permalink
Hamish schrieb:

> > achim wrote:
>> >> In attached example it is possible to calc path from 1 to 4
>> >> and from 5 to 6, but not from 1 to 2,3,5,6 or from 5 to anywhere
>> >> expect 6 and so on.
>> >>
>> >> Do you have an idea how to handle this?
>> >>
>> >> Especially: do you know if "breaking the lines" (eg. dark
>> >> green one at point 5) is possible with networking techniques?
> >
> >
> > from the image the little "+"s indicate there are nodes at all
> > intersections, so there is nothing to break really. (unless there
> > are two lines on top of each other, in which case you can do v.clean
> > remove duplicates tool)
> >
> > if you want each line to have it's own color/cat use v.category option
> > to remove all cat numbers then again to add new ones sequentially. you
> > might have to do that in another column and then change the key column
> > to the new one with v.reclass.
> >
> >
> > Hamish
> >

In my test-area I get for this network:

type       count        min        max
point          0          0          0
line         466          1        466
boundary       0          0          0
centroid       0          0          0
area           0          0          0
all          466          1        466
Layer: 2
type       count        min        max
point        642          1        642
line           0          0          0
boundary       0          0          0
centroid       0          0          0
area           0          0          0
all          642          1        642

after revoming duplicates (and re-categorization) the same
so its nothing about the and categories  :) .

after v.cleak=break (and re-categorization) I get:

type       count        min        max
point          0          0          0
line         619          1        619
boundary       0          0          0
centroid       0          0          0
area           0          0          0
all          619          1        619
Layer: 2
type       count        min        max
point        642          1        642
line           0          0          0
boundary       0          0          0
centroid       0          0          0
area           0          0          0
all          642          1        642

so automatically it doe's something in nearly the right way
(see http://article.gmane.org/gmane.comp.gis.grass.user/31102 for this)

The breaking tool does not work, so I try doing it with network-tools.

A



_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Daniel Bundala

Re: Multiple v.net.path parameters

Reply Threaded More More options
Print post
Permalink
In reply to this post by achim
Hello Achim,

If I understand your description and image correctly, then the line
from 1 to 4 is one single line and nodes 2 and 3 lie on it. If this is
the case then the module does not find a path from, say, 1 to 5. The
reason is, as you mentioned in your email, that "the module runs
successfully, but only with a network, where every line ends with the
next node" and the module "ignores" intermediate nodes. I did not test
it, but I think you get the same behaviour with v.net.path as well. In
general, this is not a bug. The thing is that the line lengths/costs
are read from a table and may represent anything and so if you know
that the cost of traversing from 1 to 4 is X then this does not tell
you what the cost of traversing from 1 to 2 or 2-3 should be. So to
fix it, you need to break the lines that is, to break line 1-4 to
lines 1-2, 2-3, 3-4.

Hope this helps,
Daniel

On Mon, Aug 17, 2009 at 3:07 PM, achim<[hidden email]> wrote:

> Hello Daniel (and others),
>
> I ran the module successfully, but only with a network, where every line
> ends with the next node.
>
> In attached example it is possible to calc path from 1 to 4 and from 5
> to 6, but not from 1 to 2,3,5,6 or from 5 to anywhere expect 6 and so on.
>
> Do you have an idea how to handle this?
>
> Especially: do you know if "breaking the lines" (eg. dark green one at
> point 5) is possible with networking techniques?
>
> Sorry for asking you directly, but I hopefully thought you are deep
> inside the topic at the moment.
>
> Thanks anyway for your work!
> Achim
>
>
>
> Daniel Bundala schrieb
>
>> Hello all,
>>
>> I have finished v.net.distance module as a part of my Google Summer of
>> Code project. The (source code of) module can be downloaded from grass
>> add-ons repository (vector/net.analyze). I recommend to download the
>> entire directory to avoid any compilation issues. Additionally, you
>> get an access to some latest network analysis modules! Anyway, simple
>> make command in the net.analyze directory should compile the modules
>> (and library). There is no documentation (yet), however, the interface
>> should be similar to the one used in v.net.path and/or v.distance.
>> Finally, here is a couple of nice pictures:
>>
>> http://people.ksp.sk/~dano/grass/nd.png
>> http://people.ksp.sk/~dano/grass/ndt.png
>> http://people.ksp.sk/~dano/grass/ndtd.png
>>
>> Blue and orange lines show the shortest length and time paths respectively.
>>
>> Best,
>> Daniel
>>
>> On Wed, Jul 1, 2009 at 5:56 PM, Moritz
>> Lennert<[hidden email]> wrote:
>>> On 01/07/09 04:44, J. Holden wrote:
>>>> Hello,
>>>>
>>>> I am looking to use v.net.path to determine the distance of many
>>>> different points to many different other points on a network.
>>>>
>>>> Is it possible to send multiple parameters to v.net.path? For
>>>> instance, I have (in theory) 4 points connected to a network. I want
>>>> to find the distance of the line segments between points 1 and 4, 2
>>>> and 4, & 3 and 4.
>>>>
>>>> I want to: run v.net.path once by passing multiple parameters; get
>>>> vector line output of each of these three paths found by v.net.path
>>>> in one output file; calculate the distance of each line from the file
>>>> using v.to.db.
>>>>
>>>> Since this is not a module of GRASS which I have worked with in the
>>>> past, I am wondering if this is possible.
>>> Sure, as mentioned on the man page:
>>>
>>> "Nodes can be piped into the program from file or from stdin. The syntax is
>>> as follows:
>>>
>>> id start_point_category end_point_category
>>>
>>> or
>>>
>>> id start_point_x start_point_y end_point_x end_point_y"
>>>
>>>
>>> So to take your example, and assuming that 1,2,3,4 are category values of
>>> existing points:
>>>
>>> Create a file containing:
>>>
>>> 1 1 4
>>> 2 2 4
>>> 3 3 4
>>>
>>> and feed it to v.net.path with the file= parameter.
>>>
>>> You will then get one vector map with severals lines which have the category
>>> values used in the first column of your file.
>>>
>>> Moritz
>>> _______________________________________________
>>> grass-user mailing list
>>> [hidden email]
>>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>>
>> _______________________________________________
>> grass-user mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
achim

Re: Multiple v.net.path parameters

Reply Threaded More More options
Print post
Permalink
Hello Daniel,

thanks you very much for helping.

> If I understand your description and image correctly, then the line
> from 1 to 4 is one single line and nodes 2 and 3 lie on it. If this is

You understand me right. I thought, you maybe knew a way, doing the
breaking of the lines at the "on line laying" points.

I thought its there is a way like "automatically(!) adding a little road
to a big one from one side (not crossing) and integrating it to the
network"?

Greetings,
Achim


PS:
The bug is in the v.edit tool=break, as I mentioned before:
breaking one selected line on a desired coordinate works well, but
selecting two or more (or all) (eg. yellow and red, point 2) breaking on
the same point, I get artifacts. This depends on the direction of the
yellow line.

(like
http://lists.osgeo.org/pipermail/grass-user/attachments/20090814/816f9568/break-0001.jpg)

If you have an idea..its welcome!
Not being in touch with the structure of the program, sadly I am not
capable of fixing the bug in acceptable time,




Daniel Bundala schrieb:

> the case then the module does not find a path from, say, 1 to 5. The
> reason is, as you mentioned in your email, that "the module runs
> successfully, but only with a network, where every line ends with the
> next node" and the module "ignores" intermediate nodes. I did not test
> it, but I think you get the same behaviour with v.net.path as well. In
> general, this is not a bug. The thing is that the line lengths/costs
> are read from a table and may represent anything and so if you know
> that the cost of traversing from 1 to 4 is X then this does not tell
> you what the cost of traversing from 1 to 2 or 2-3 should be. So to
> fix it, you need to break the lines that is, to break line 1-4 to
> lines 1-2, 2-3, 3-4.
>
> Hope this helps,
> Daniel
>
> On Mon, Aug 17, 2009 at 3:07 PM, achim<[hidden email]> wrote:
>> Hello Daniel (and others),
>>
>> I ran the module successfully, but only with a network, where every line
>> ends with the next node.
>>
>> In attached example it is possible to calc path from 1 to 4 and from 5
>> to 6, but not from 1 to 2,3,5,6 or from 5 to anywhere expect 6 and so on.
>>
>> Do you have an idea how to handle this?
>>
>> Especially: do you know if "breaking the lines" (eg. dark green one at
>> point 5) is possible with networking techniques?
>>
>> Sorry for asking you directly, but I hopefully thought you are deep
>> inside the topic at the moment.
>>
>> Thanks anyway for your work!
>> Achim
>>
>>
>>
>> Daniel Bundala schrieb
>>
>>> Hello all,
>>>
>>> I have finished v.net.distance module as a part of my Google Summer of
>>> Code project. The (source code of) module can be downloaded from grass
>>> add-ons repository (vector/net.analyze). I recommend to download the
>>> entire directory to avoid any compilation issues. Additionally, you
>>> get an access to some latest network analysis modules! Anyway, simple
>>> make command in the net.analyze directory should compile the modules
>>> (and library). There is no documentation (yet), however, the interface
>>> should be similar to the one used in v.net.path and/or v.distance.
>>> Finally, here is a couple of nice pictures:
>>>
>>> http://people.ksp.sk/~dano/grass/nd.png
>>> http://people.ksp.sk/~dano/grass/ndt.png
>>> http://people.ksp.sk/~dano/grass/ndtd.png
>>>
>>> Blue and orange lines show the shortest length and time paths respectively.
>>>
>>> Best,
>>> Daniel
>>>
>>> On Wed, Jul 1, 2009 at 5:56 PM, Moritz
>>> Lennert<[hidden email]> wrote:
>>>> On 01/07/09 04:44, J. Holden wrote:
>>>>> Hello,
>>>>>
>>>>> I am looking to use v.net.path to determine the distance of many
>>>>> different points to many different other points on a network.
>>>>>
>>>>> Is it possible to send multiple parameters to v.net.path? For
>>>>> instance, I have (in theory) 4 points connected to a network. I want
>>>>> to find the distance of the line segments between points 1 and 4, 2
>>>>> and 4, & 3 and 4.
>>>>>
>>>>> I want to: run v.net.path once by passing multiple parameters; get
>>>>> vector line output of each of these three paths found by v.net.path
>>>>> in one output file; calculate the distance of each line from the file
>>>>> using v.to.db.
>>>>>
>>>>> Since this is not a module of GRASS which I have worked with in the
>>>>> past, I am wondering if this is possible.
>>>> Sure, as mentioned on the man page:
>>>>
>>>> "Nodes can be piped into the program from file or from stdin. The syntax is
>>>> as follows:
>>>>
>>>> id start_point_category end_point_category
>>>>
>>>> or
>>>>
>>>> id start_point_x start_point_y end_point_x end_point_y"
>>>>
>>>>
>>>> So to take your example, and assuming that 1,2,3,4 are category values of
>>>> existing points:
>>>>
>>>> Create a file containing:
>>>>
>>>> 1 1 4
>>>> 2 2 4
>>>> 3 3 4
>>>>
>>>> and feed it to v.net.path with the file= parameter.
>>>>
>>>> You will then get one vector map with severals lines which have the category
>>>> values used in the first column of your file.
>>>>
>>>> Moritz
>>>> _______________________________________________
>>>> grass-user mailing list
>>>> [hidden email]
>>>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>>>
>>> _______________________________________________
>>> grass-user mailing list
>>> [hidden email]
>>> http://lists.osgeo.org/mailman/listinfo/grass-user


_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user

break.jpg (28K) Download Attachment
ldk

Re: Multiple v.net.path parameters

Reply Threaded More More options
Print post
Permalink
Hello,

I am new to nabble and new to GRASS. I am touching the limits of arcView and ArcGIS scripting.

I need to create multiple paths (1000's x 1000's) of routes te generate and I am looking into grass to make this possible.

I tried to get v.net.path working without any success. Probably because I am a novice to GRASS... I am working in 6.4, XP python interface. I switching to the command line because I get better error response this way.

Some of my issues:

1. I am not used to datasets combining polylines and node in one dataset. It looks as if the network model is a combination of these different objects. I can live with this... just mentioning.

2. I tried the

id start_point_category end_point_category
and
id start_point_x start_point_y end_point_x end_point_y

syntax with no success. Where do you determine in the command which syntax you use ? I see no arguments to distinguish between these two options ?

Actually I want to pass another vector file, containing only my origins and destinations I want to investigate... This way I control the vertex ID.

the v.net.path arguments:
input = network vector map ? (the one containing polylines and nodes?)
out =  output seems OK
type/alayer/nlayer  --> only necessary when custom weight are linked to the polylines/nodes ?
file:   this is obviously not a vector input file, how do I tell what file format has to be used (categories, xy ?? None of the combination I tried was successful.

errors;
points without category nfield[2]
wrong input format  "1 34 125"  when using node cat in model file

idem for "1 105000 99568 104500 100100" (start/end xy).


3. Is there a possibility to pass a file with  "id, start_x, start_y, end_x, end_y" as input ?

does somebody has an example file and corresponding commandline to feed the coordinates of start and end node?

Thanks,

Luc