[GRASS-dev] [GRASS GIS] #2473: v.net connection operation

#2473: v.net connection operation
-------------------------+--------------------------------------------------
Reporter: matmar | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: svn-trunk
Keywords: v.net | Platform: Linux
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2473&gt;
GRASS GIS <http://grass.osgeo.org>

#2473: v.net connection operation
-------------------------+--------------------------------------------------
Reporter: matmar | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: svn-trunk
Keywords: v.net | Platform: Linux
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by mlennert):

Replying to [ticket:2473 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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2473#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#2473: v.net connection operation
-------------------------+--------------------------------------------------
Reporter: matmar | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: svn-trunk
Keywords: v.net | Platform: Linux
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by matmar):

Replying to [comment:1 mlennert]:
> Replying to [ticket:2473 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.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2473#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#2473: v.net connection operation
-------------------------+--------------------------------------------------
Reporter: matmar | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: svn-trunk
Keywords: v.net | Platform: Linux
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by mmetz):

Replying to [ticket:2473 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).

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2473#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>