[GRASS-user] how to change all cats in a vector line

César Augusto Ramírez Franco caesarivs at gmail.com
Sat Nov 29 20:13:43 PST 2014


Hello Michael

You could use r.stream.order after r.stream.extract to get your stream
network ordered, and then, after running r.thin on the ordered stream
network, convert it to vector using r.to.vect with the -v flag, that way,
each order is a cat, you can them use v.to.points or the add-on suggested
below to get topologically-correct points along the stream network, you
could also use r.stream.distance and upload distance and elevation to each
point using v.what.rast

I usually run R from within GRASS and use the spgrass6 library to read the
vector map and analyze the data there

Regards

César.

El sáb, 29 de noviembre de 2014 06:29 p.m., Helmut Kudrnovsky <hellik at web.de>
escribió:

> Michael Barton wrote
> > Hi Markus,
> >
> > What I'm trying to do is start with a raster stream map from r.drain and
> > convert it to a sequence of vector points, where each point has
> > information as to its position along the stream. I then use the points
> for
> > sampling a stream profile and related information. Oddly enough, with all
> > of the very useful stream analysis modules, there is nothing I could find
> > to generate the data for a stream profile (distance from outlet or from
> > headwaters vs. elevation).
> >
> > v.to.points does a nice job of creating a sequence of evenly spaced
> points
> > with information about their location along a line (the "along" field).
> > BUT, if the line is composed of multiple segments or even if it has an
> > irregularity in it, the "along" values start over again from 0. The only
> > way I can use it is if I have a very clean and continuous vector line
> with
> > only a single cat.
> >
> > This has proven surprisingly difficult to obtain reliably from my raster
> > stream map. So far, the only way has been to do a two sequences of
> v.clean
> > (with thresholds 1.5 X the raster resolution) and v.build.polylines. If
> > you have any better suggestion, I'd love to hear it.
> >
> > Thanks again for the polylines idea. That was a big help.
> >
> > Michael
> > ____________________
> > C. Michael Barton
> > Director, Center for Social Dynamics & Complexity
> > Professor of Anthropology, School of Human Evolution & Social Change
> > Head, Graduate Faculty in Complex Adaptive Systems Science
> > Arizona State University
> >
> > voice:  480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
> > fax: 480-965-7671 (SHESC),  480-727-0709 (CSDC)
> > www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
> >
> >
> >
> >
> >> On Nov 29, 2014, at 10:20 AM, Michael Barton <
>
> > Michael.Barton@
>
> > > wrote:
> >>
> >> Thanks. This helped.
> >>
> >> Michael
> >> ____________________
> >> C. Michael Barton
> >> Director, Center for Social Dynamics & Complexity
> >> Professor of Anthropology, School of Human Evolution & Social Change
> >> Head, Graduate Faculty in Complex Adaptive Systems Science
> >> Arizona State University
> >>
> >> voice:  480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
> >> fax: 480-965-7671 (SHESC),  480-727-0709 (CSDC)
> >> www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>> On Nov 29, 2014, at 1:23 AM, Markus Neteler <
>
> > neteler@
>
> > > wrote:
> >>>
> >>> On Sat, Nov 29, 2014 at 6:16 AM, Michael Barton <
>
> > Michael.Barton@
>
> > > wrote:
> >>>> I have a vector line that is divided into 12 cat values. I’d like all
> >>>> of the
> >>>> line to have a single cat value. I’ve tried v.category to no avail. If
> >>>> I
> >>>> delete all categories and then add new categories, I get 12 cats
> again.
> >>>> And
> >>>> I can find no other way to get a single cat for the entire line.
> >>>> Hopefully
> >>>> someone can tell what I’m missing here.
> >>>
> >>> Please try to use
> >>> http://grass.osgeo.org/grass70/manuals/v.build.polylines.html
> >>>
> >>> Markus
> >>
> >
> > _______________________________________________
> > grass-user mailing list
>
> > grass-user at .osgeo
>
> > http://lists.osgeo.org/mailman/listinfo/grass-user
>
> http://grass.osgeo.org/grass71/manuals/r.stream.extract.html ?
>
>
>
> -----
> best regards
> Helmut
> --
> View this message in context: http://osgeo-org.1560.x6.
> nabble.com/how-to-change-all-cats-in-a-vector-line-tp5175575p5175634.html
> Sent from the Grass - Users mailing list archive at Nabble.com.
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20141130/fc9f610c/attachment.html>


More information about the grass-user mailing list