[GRASS-user] v.net.path problem (not the shortest route)

Hi to all

I've a question concerning v.net.path. I am probably missing something
obvious :-[

In the v.net.path example that I've posted yesterday
(http://rsg.pml.ac.uk/wps/example/index.html), if we put the car over
madrid and the destination in the node below Santa Maria (below Porto
city), the v.net.path uses a different route going thru Vigo. Therefore
picking a route that isnt the shortest.

A screenshot of the problem can be seen here: http://derp.co.uk/6de36

Basically it seems that v.net.path starts to pick the shortest path from
the 1st node to the 2nd node independently of the total route length
(therefore not checking if it is actually the shortest total path).

Any comments and suggestions ?!

Jorge

--------------------------------------------------------------------------------
Plymouth Marine Laboratory

Registered Office:
Prospect Place
The Hoe
Plymouth PL1 3DH

Website: www.pml.ac.uk
Click here for PML Annual Review
Registered Charity No. 1091222
PML is a company limited by guarantee
registered in England & Wales
company number 4178503

Please think before you print

--------------------------------------------------------------------------------
This e-mail, its content and any file attachments are confidential.

If you have received this e-mail in error please do not copy, disclose it to any third party or use the contents or attachments in any way. Please notify the sender by replying to this e-mail or e-mail forinfo@pml.ac.uk and then delete the email without making any copies or using it in any other way.

The content of this message may contain personal views which are not the views of Plymouth Marine Laboratory unless specifically stated.

You are reminded that e-mail communications are not secure and may contain viruses. Plymouth Marine Laboratory accepts no liability for any loss or damage which may be caused by viruses.
--------------------------------------------------------------------------------

On Fri, Aug 19, 2011 at 11:16 AM, Jorge de Jesus <jmdj@pml.ac.uk> wrote:

Hi to all

I've a question concerning v.net.path. I am probably missing something
obvious :-[

In the v.net.path example that I've posted yesterday
(http://rsg.pml.ac.uk/wps/example/index.html), if we put the car over
madrid and the destination in the node below Santa Maria (below Porto
city), the v.net.path uses a different route going thru Vigo. Therefore
picking a route that isnt the shortest.

There were problems with the v.net.* modules in GRASS 6.4.0, maybe
also in 6.4.1. The v.net.* modules should be working correctly in
6.4.2, 6.5, and 7. Just in case you're using an older version of
GRASS.

Can you post 1) the full v.net command used to prepare the network, 2)
the output of v.net op=report, 3) the full v.net.path command? This
information should help to track down the problem.

Markus M

On Fri, Aug 19, 2011 at 11:16 AM, Jorge de Jesus <jmdj@pml.ac.uk> wrote:

Hi to all

I've a question concerning v.net.path. I am probably missing something
obvious :-[

In the v.net.path example that I've posted yesterday
(http://rsg.pml.ac.uk/wps/example/index.html), if we put the car over
madrid and the destination in the node below Santa Maria (below Porto
city), the v.net.path uses a different route going thru Vigo. Therefore
picking a route that isnt the shortest.

A screenshot of the problem can be seen here: http://derp.co.uk/6de36

Basically it seems that v.net.path starts to pick the shortest path from
the 1st node to the 2nd node independently of the total route length
(therefore not checking if it is actually the shortest total path).

Any comments and suggestions ?!

Update:

One intersection is missing: run

v.clean in=graph out=graph_clean tool=break,rmdupl

rebuild network graph from vectors graph_clean and nodes, calculate
shortest path. That should give you the real shortest path.

Markus M

Hi to all

As usual it was something simple that I've missed :slight_smile: .... and of course
v.net.path (in GRASS70) was correct

v.clean in=graph out=graph_clean tool=break,rmdupl

did the trick to fix the graph and put everything in order (even the cat
field was missing)

The graph was actually prepared in QGIS, and I should have imported it
into GRASS and check the graph

THANKS, I own you a beer

Jorge

On 19/08/11 10:29, Markus Metz wrote:

On Fri, Aug 19, 2011 at 11:16 AM, Jorge de Jesus <jmdj@pml.ac.uk> wrote:

Hi to all

I've a question concerning v.net.path. I am probably missing something
obvious :-[

In the v.net.path example that I've posted yesterday
(http://rsg.pml.ac.uk/wps/example/index.html), if we put the car over
madrid and the destination in the node below Santa Maria (below Porto
city), the v.net.path uses a different route going thru Vigo. Therefore
picking a route that isnt the shortest.

There were problems with the v.net.* modules in GRASS 6.4.0, maybe
also in 6.4.1. The v.net.* modules should be working correctly in
6.4.2, 6.5, and 7. Just in case you're using an older version of
GRASS.

Can you post 1) the full v.net command used to prepare the network, 2)
the output of v.net op=report, 3) the full v.net.path command? This
information should help to track down the problem.

Markus M

--------------------------------------------------------------------------------
Plymouth Marine Laboratory

Registered Office:
Prospect Place
The Hoe
Plymouth PL1 3DH

Website: www.pml.ac.uk
Click here for PML Annual Review
Registered Charity No. 1091222
PML is a company limited by guarantee
registered in England & Wales
company number 4178503

Please think before you print

--------------------------------------------------------------------------------
This e-mail, its content and any file attachments are confidential.

If you have received this e-mail in error please do not copy, disclose it to any third party or use the contents or attachments in any way. Please notify the sender by replying to this e-mail or e-mail forinfo@pml.ac.uk and then delete the email without making any copies or using it in any other way.

The content of this message may contain personal views which are not the views of Plymouth Marine Laboratory unless specifically stated.

You are reminded that e-mail communications are not secure and may contain viruses. Plymouth Marine Laboratory accepts no liability for any loss or damage which may be caused by viruses.
--------------------------------------------------------------------------------