[GRASSLIST:9338] Re: Extracting and sum values in a tab

Luca Casagrande luca.casagrande at gmail.com
Tue Dec 6 10:43:11 EST 2005


Thx for your answer Ivan....
Right now I have got the layer to work with, but i still don't know how 
calculate the area of a buffer i created. 
I have created a buffer around an area (100 m of distance) inside the 
regoion,but i don't know how calculate the area...

Thx
Luca
>Alle 12:54, martedì 06 dicembre 2005, ivan marchesini ha scritto:
> You should use v.reclass for obtaining a map (PIPPO.map) where each area
> feaure has a cat described by the region value (before this you should
> give an integer code to the region column, for example A=1 B=2, and so
> on.., or creating a new column named for example region.int )
> later yuou can use the sql command
>
> create table PIPPO as select REGION.INT, sum( TOTAL_POPULATION) from
> YOUR_TABLE group by REGION.INT
>
> for creating a new table called pippo where you have the region code
> (1,2,3,....) and the sum of the area values for each code...
>
> later, using v.db.connect, you can connect the PIPPO.map to the PIPPO
> table using the region code as a key...
>
> hope this help....
>
> Ivan
>
> Il giorno lun, 05-12-2005 alle 19:43 +0000, Luca Casagrande ha scritto:
> > Hi guys
> >
> > I have got an area vector layer that describes the extension of different
> > cities and also the region in where them are; the table associated is
> > something like this:
> >
> > REGION		CITY		EXTENSION
> >     A			test1			100000
> >     A			test2			5000
> >     B			........			20000
> >     C                 ........			300000
> >
> > I'd like to create a surface layer that describes the extensionof each
> > region and with a tab like this one:
> >
> > REGION			TOTAL POPULATION
> > 	A				Sum of all
> > 	B				Sum of all
> > 	C				Sum of all
> >
> > Can this be done?
> >
> > Thx
> > Luca




More information about the grass-user mailing list