Opened 6 years ago

Closed 5 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 6 years ago.
example of v.net op=connection output
v_net_example_drawing.png (124.9 KB) - added by matmar 6 years ago.

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by matmar

Attachment: v_net_example.png added

example of v.net op=connection output

comment:1 in reply to:  description ; Changed 6 years ago by 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

Changed 6 years ago by matmar

Attachment: v_net_example_drawing.png added

comment:2 in reply to:  1 Changed 6 years ago by matmar

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.

comment:3 in reply to:  description Changed 6 years ago by mmetz

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 Changed 5 years ago by mlennert

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.