[GRASS-user] sum of areas of certain attributes

Hello list,

I have a polygon map with a huge table, in which some columns give the information about a classification of the single polygons (these are represnted by single categories). I would like to calculate e.g. the sum of areas belonging to each class. How can I do this
I tried a way by extracting the class needed indiviadually, generating a new tabel and so on, but it seems to be quite complicated. Is there a more simple way to get the results?

Thanks!

Manuel

--

_______________________________________________________________________
Dr. Manuel Seeger
Wiss. Assistent Scientific Assistant
Physische Geographie Dpt. of Physical Geography
FB VI - Geographie/Geowissenschaften Geography/Geosciences
Universität Trier University of Trier
D - 54286 Trier
Tel.: +49-651-201 4557
Fax: +49-651-201 3976
Web: http://www-neu.uni-trier.de/index.php?id=9607

On 15/11/07 08:27, Dr. Manuel Seeger wrote:

Hello list,

I have a polygon map with a huge table, in which some columns give the information about a classification of the single polygons (these are represnted by single categories). I would like to calculate e.g. the sum of areas belonging to each class. How can I do this
I tried a way by extracting the class needed indiviadually, generating a new tabel and so on, but it seems to be quite complicated. Is there a more simple way to get the results?

v.to.db with option=area ?

Moritz

[please always cc the list to let everyone profit of the discussion]

On 15/11/07 11:10, Dr. Manuel Seeger wrote:

Thanks Moritz,

but I think I did not explain clear enough.
v.to.db calculates the values for each category (here this is each polygon), but I need the sum of values for different classes, which are composed by a changing number of polygons. I want to know the area of each class.

After running v.to.db, you can run a select on the classification column. Something like:

echo "select sum(area) from TABLE group by ClassificationColumn" | db.select

If your classification information is in integer form, you can also use v.reclass:

v.reclass in=OrigMap out=ReclassMap Column=ClassificationColumn

and then v.to.db on ReclassMap.

Moritz

how?
Thank you!

Manuel

Moritz Lennert schrieb:

On 15/11/07 08:27, Dr. Manuel Seeger wrote:

Hello list,

I have a polygon map with a huge table, in which some columns give the information about a classification of the single polygons (these are represnted by single categories). I would like to calculate e.g. the sum of areas belonging to each class. How can I do this
I tried a way by extracting the class needed indiviadually, generating a new tabel and so on, but it seems to be quite complicated. Is there a more simple way to get the results?

v.to.db with option=area ?

Moritz