[GRASSLIST:139] Re: How to report length totals for all lines matching specific ID

David Finlayson david.p.finlayson at gmail.com
Wed Mar 15 13:16:44 EST 2006


On 3/15/06, David Finlayson <david.p.finlayson at gmail.com> wrote:
> If you are using a database for your attributes can't you just run an
> SQL query? Something along the lines of:
>
> select first(CLASS) sum(SEG_LENGTH) from <table_name> group by CLASS;
>
>
>
> On 3/15/06, Patton, Eric <epatton at nrcan.gc.ca> wrote:
> > I have a vector of a coastline; the coast is segmented into different
> > coastal types, according to unique IDs:
> >
> > CAT Class_ID CLASS         SEG_LENGTH
> > 1   5        Rock Cliff    56.789000
> > 2   7        Barrier Beach 13.450000
> > ....
> >
> >
> > I successfully popluated the SEG_LENGTH column with the length of each
> > segment using v.to.db:
> >
> > v.to.db Coastal_Classes option=length type=line units=m
> >
> > Now I want to report total lengths of each CLASS (i.e., total length of all
> > "Rock Cliff" segments, etc.)
> >
> > Any ideas?
> >
> > ~ Eric.
> >
> >
>
>
> --
> David Finlayson
>


--
David Finlayson




More information about the grass-user mailing list