[GRASSLIST:9308] Re: Extracting and sum values in a tab
Richard Greenwood
richard.greenwood at gmail.com
Mon Dec 5 14:00:09 EST 2005
On 12/5/05, Luca Casagrande <luca.casagrande at gmail.com> wrote:
>
> 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
To just get the statistics:
select REGION, sum( TOTAL_POPULATION)
from YOUR_TABLE
group by REGION
If you need spatial objects, use
"Combine objects using column..." in the "Table" menu.
HTH
--
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com
More information about the grass-user
mailing list