[GRASSLIST:2693] Re: extracting vector attributes

Radim Blazek blazek at itc.it
Fri Feb 20 03:31:07 EST 2004


On Thursday 19 February 2004 16:02, Christopher Fonnesbeck wrote:
> On Feb 19, 2004, at 4:14 AM, Radim Blazek wrote:
> >> I am trying to determine the area of each polygon in a layer, and
> >> store
> >> this statistic as a column in the attribute table (my vector
> >> attributes
> >> are stored in MySQL). There appears to be no vector function in the
> >> reference manual that provide this function, but I'm sure there must
> >> be
> >> something that does this. Please point me in the right direction.
> >
> > v.to.db option=area
> >
> > More precisely/generally, it does not update each row in the table by
> > area size
> > of each polygon, but by the sum of area sizes of all polygons with the
> > same category.
>
> OK, it sounds like I will have to program something. I need the area of
> each polygon as an attribute field, since I am trying to classify
> stream segments by the size of the sub-basin that drains into it. The
> easiest thing, I suppose would be to take both coverages over to
> ArcView, since this is a trivial operation there (but that would be
> cheating, I guess ;-] )

Why? What is the problem? Why you cannot use v.to.db?
If you don't have unique category for each polygon you can add it 
by v.category.

Radim




More information about the grass-user mailing list