[GRASS-user] snap point to line/break line at given points

Moritz Lennert mlennert at club.worldonline.be
Mon Apr 25 09:51:28 EDT 2011


On 25/04/11 12:04, Micha Silver wrote:
>   On 04/24/2011 03:36 PM, Johannes Radinger wrote:
>> Hi Micha,
>> Hi other GRASS users!
>>
>> Am 23.04.2011 um 18:01 schrieb Micha Silver:
>>
>>
>>
>> So if I understand you correctly, it is not really possible to split a
>> river network at one point into to parts. I attached a picture to
>> illustrate what I want (e.g. two break points in a rivernet). I think
>> that this kind of breaking I want to do is quite common, so there's
>> probably another solution in grass gis...
>>
>
> Well, in QGIS you can merge all the line segments of the original
> shapefile into one, using the "Vector->Geometry Tools->Singleparts to
> Multipart" tool. This will leave you with a single  "MULTILINE"  feature.
>
> However when importing to GRASS all the lines will be "re-broken" at
> each intersection and new nodes created in order to enforce topology.
> Referring to the attached image (I altered yours) the stars represent
> topological "errors" and as far as I know GRASS will not allow you to
> ignore these intersections when you import. (The only vector feature
> that can be imported without topology is points).
>
> So to recap:
> * You can split line features at arbitrary points using v.edit tool=break
> * You cannot, AFAIK, cause GRASS to merge line segments where
> topological rules require there to be a node.

You can, however, attribute the same category number (or the same other 
arbitrary attribute) to those segments which belong to the same subnetwork.

Your "physical" (i.e. on disk in GRASS format) representation of the 
network(s) does not necessarily have to be the same as the semantical 
(content-oriented) representation. So you can represent the subnetworks 
through attribute info. Or you can play with layers: the entire river 
network with the same cat value in layer 1, different cat values for 
subnetworks in layer 2.

If you need to extract only parts of the network, almost all of the 
modules allow you to either use cat values or a where clause on your 
attribute as a filter.

Moritz


More information about the grass-user mailing list