[GRASS-user] snap point to line/break line at given points
Moritz Lennert
mlennert at club.worldonline.be
Tue Apr 26 09:15:05 EDT 2011
On 25/04/11 18:37, Johannes Radinger wrote:
>
> Am 25.04.2011 um 15:51 schrieb Moritz Lennert:
>
>> 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.
>>
> For sure that would be a solution to have the same category number for
> all single segments in a subnetwork. But how to define the subnetwork
> between the breakpoints, or how can I tell grass which segments belong
> to a subnetwork, so far I don't know any tool in GRASS which I can use
> in a python script.
GRASS cannot guess which segment belongs to which subnet. This is an
information that you have to provide GRASS with in some form.
Maybe v.strahler in the GRASS AddOns can help you. Or you can use
r.watershed to create basins and then attribute the basin numbers to
your vector lines ?
Moritz
More information about the grass-user
mailing list