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
On 12/5/05, Luca Casagrande <luca.casagrande@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@gmail.com
www.greenwoodmap.com
On Mon, 5 Dec 2005 19:43:41 +0000
Luca Casagrande <luca.casagrande@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
I'm not sure I understand your question because it is unclear to me
what you mean by extension.
If you wanted to overlay the different layers and add values in areas
of overlap, one way to do that would be to convert the vectors to
rasters and use r.mapcalc.
T
--
Trevor Wiens
twiens@interbaun.com
The significant problems that we face cannot be solved at the same
level of thinking we were at when we created them.
(Albert Einstein)
Luca Casagrande <luca.casagrande@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
I'm not sure I understand your question because it is unclear to me
what you mean by extension.
If you wanted to overlay the different layers and add values in areas
of overlap, one way to do that would be to convert the vectors to
rasters and use r.mapcalc.
T
The first step would be to join areas, in the same vector layer, who have got
the same attribute on the tab (in my example the same region). Then i'll sum
the total population on each region.
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
--
Ivan Marchesini
Department of Civil and Environmental Engineering
University of Perugia
Via G. Duranti 93/a
06125
Perugia (Italy)
e-mail: marchesini@unipg.it
ivan.marchesini@gmail.com
tel: +39(0)755853760
fax: +39(0)755853756
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
Alle 12:54, martedì 06 dicembre 2005, ivan marchesini ha scritto:
create table PIPPO as select REGION.INT, sum( TOTAL_POPULATION) from
YOUR_TABLE group by REGION.INT
I got error running this statment... if i understand it, this mean:
Create a new tab with the first column as region.int and the second as the sum
of all the values of total_population with the same region.int value, all
taken from your_table.
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...