Opened 9 years ago

Closed 9 years ago

#2473 closed enhancement (fixed)

v.net connection operation

Reported by: matmar Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Vector Version: svn-trunk
Keywords: v.net Cc:
CPU: Unspecified Platform: Linux

Description

Hi all,

I'm not able to connect points with the nearest line segment in a line vector using v.net.

v.net connects a line vector with the points in a point vector file. The connection process follows the category progress so the output is not the fittest solution for a network distance analysis as the one I need to perform.

Following, the commands to reproduce the issue in nc_spm_08_grass7:

g.region vect=roadsmajor
v.mkgrid map=points_grid -p position=region grid=20,20
v.net input=roadsmajor points=points_grid out=roads_to_points operation=connect threshold=5000 --o

plot:

d.mon wx0
d.vect roads_to_points
d.vect points_grid col=red display=cat

Is there a way to connect each point to the nearest original road segment?

Matteo

Attachments (2)

v_net_example.png (199.9 KB ) - added by matmar 9 years ago.
example of v.net op=connection output
v_net_example_drawing.png (124.9 KB ) - added by matmar 9 years ago.

Download all attachments as: .zip

Change History (6)

by matmar, 9 years ago

Attachment: v_net_example.png added

example of v.net op=connection output

in reply to:  description ; comment:1 by mlennert, 9 years ago

Replying to matmar:

Hi all,

I'm not able to connect points with the nearest line segment in a line vector using v.net.

v.net connects a line vector with the points in a point vector file. The connection process follows the category progress so the output is not the fittest solution for a network distance analysis as the one I need to perform.

Following, the commands to reproduce the issue in nc_spm_08_grass7:

g.region vect=roadsmajor
v.mkgrid map=points_grid -p position=region grid=20,20
v.net input=roadsmajor points=points_grid out=roads_to_points operation=connect threshold=5000 --o

plot:

d.mon wx0
d.vect roads_to_points
d.vect points_grid col=red display=cat

Is there a way to connect each point to the nearest original road segment?

Use the '-s' flag (Snap points to network) available in grass7.

Moritz

by matmar, 9 years ago

Attachment: v_net_example_drawing.png added

in reply to:  1 comment:2 by matmar, 9 years ago

Replying to mlennert:

Replying to matmar:

Hi all,

I'm not able to connect points with the nearest line segment in a line vector using v.net.

v.net connects a line vector with the points in a point vector file. The connection process follows the category progress so the output is not the fittest solution for a network distance analysis as the one I need to perform.

Following, the commands to reproduce the issue in nc_spm_08_grass7:

g.region vect=roadsmajor
v.mkgrid map=points_grid -p position=region grid=20,20
v.net input=roadsmajor points=points_grid out=roads_to_points operation=connect threshold=5000 --o

plot:

d.mon wx0
d.vect roads_to_points
d.vect points_grid col=red display=cat

Is there a way to connect each point to the nearest original road segment?

Use the '-s' flag (Snap points to network) available in grass7.

Moritz

Hi Moritz,

-s glues points to the nearest network segment but doesn't connect each point to the nearest network segment (so I lose information). I attached a drawing about what I meant, hoping it helps.

in reply to:  description comment:3 by mmetz, 9 years ago

Replying to matmar:

Hi all,

I'm not able to connect points with the nearest line segment in a line vector using v.net.

v.net connects a line vector with the points in a point vector file. The connection process follows the category progress so the output is not the fittest solution for a network distance analysis as the one I need to perform.

This is a bug in v.net, fixed in r62683,4 (trunk, relbr7).

comment:4 by mlennert, 9 years ago

Resolution: fixed
Status: newclosed

As this has been fixed a year ago and there have been no complaints since, I'm closing this bug.

Note: See TracTickets for help on using tickets.