[GRASS-user] remove line segment from a line vector

Markus Neteler neteler at osgeo.org
Wed Nov 5 02:45:43 PST 2014


On Wed, Nov 5, 2014 at 9:59 AM, Markus Metz
<markus.metz.giswork at gmail.com> wrote:
> On Tue, Nov 4, 2014 at 11:17 PM, matteo marcantonio
> <matteo.marcantonio at fmach.it> wrote:
>> Hello list,
>>
>> I'm writing since I need to clean a line vector (road network) removing all
>> the line segments not connected to other segments. I guess that I need to
>> remove all the segment that have valence = 0.
>>
>> I need to remove them to perform a network distance analysis avoiding the
>> issue of unreachable nodes.
>>
>> Is there any way to do it?
>
> You could use v.net.alloc with one node and then extract the allocated
> network. This will automatically discard all lines not connected to
> this node.

Sounds good - but isn't it that v.net.alloc requires at least two
nodes? Of course I could then merge the two resulting subnets which do
no longer contain the unconnected vector lines.

Please let's add this as a new
http://grasswiki.osgeo.org/wiki/Category:FAQ entry.

markusN


More information about the grass-user mailing list