[GRASS-user] Merge lines into common categories based an attribute information

Johannes Radinger johannesradinger at gmail.com
Sun Sep 17 09:48:15 PDT 2017


Thank you Moritz!

Of course, v.reclass does the job. I just didn't see the column option...

Regarding the second (additional) part of this question: It seems that
v.to.db works well to report line lengths on a category-base. However,
sinuosity seems to be calculated based on features (i.e. feature ids).
Thus, I only get reasonable results if a cat only consists of one feature.
For connected lines that consist of more than one feature (lines) the
sinuosity index is not correct. So, I probably need to loop over the cats,
extract the lines that belong to one cat and build a polyline before
calculating sinuosity.

/J

On Sun, Sep 17, 2017 at 3:53 PM, Moritz Lennert <
mlennert at club.worldonline.be> wrote:

>
>
> Le 17 septembre 2017 15:16:02 GMT+02:00, Johannes Radinger <
> johannesradinger at gmail.com> a écrit :
> >Hi,
> >
> >how can I merge multiple lines into one category based on some
> >attribute
> >information.
> >For example I have a line vector consisting of 10 lines and several
> >lines
> >belong to three different groups (lines belonging to the same group
> >share
> >the same value in a specific attribute column). Now I'd like to merge
> >them
> >(assign a common cats) and create an new attribute with the "group
> >value"
> >as new category (the table should then have 3 rows)? I think this
> >should be
> >easily possible, but I could not yet find the correct tool.
>
> Try v.reclass.
>
>
> Moritz
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170917/a1d74ce7/attachment.html>


More information about the grass-user mailing list