[GRASSLIST:6385] Computing polygon area after/during v.overlay
Jesse Hamner
jhamner at emory.edu
Sat Apr 9 19:12:42 EDT 2005
Hi folks,
I have not been able to compute the area of vector polygons after a
v.overlay operation. Here's what I've done in the 6.0.0 release of
GRASS, running OS X 10.3.8:
1. Import ESRI GRID data (2.5-degree pixels, r.in.arc input=name.txt
output=name1 type=CELL title=name1 mult=1.0 )
2. Import ESRI shapefile (global political boundaries, v.in.ogr
dsn=cntry92.shp output=esri92shp layer=cntry92 min_area=0.0001 snap=-1
location=esri92shp -o )
3. Convert the raster file into vector polygons (r.to.vect input=name1
output=name2 feature=area )
4. Overlay the two vector files (v.overlay ainput=name2 atype=area
alayer=1 binput=esri92shp btype=area blayer=1 output=name2_overlay
operator=or olayer=1,0,0 )
All the data are lat-long format, as is the location. After the
v.overlay, I get topology and the .dbf file shows that I've
successfully merged the data, but I haven't found a way to compute the
areas of each clipped polygon. Ultimately, I need to create weighted
averages (first by area, later by other variables) for each country.
I have 1608 GRID files to import, convert, and overlay. So, it is less
desirable to convert the files in Maptitude or ARC/INFO and then
re-import the data, as I can script in Perl/bash but have not learned
Maptitude's GISDK or the Arc Macro Language (or whatever it's called
these days--I quit using ARC 6 around 1998...).
I've bought Neteler & Mitasova (2004), I've read through the tutorials
I could find, and I have searched Google, groups.google, and the gmane
archive of the GRASS list. Am I missing something? Is there another
manual I should read for the answer?
Many thanks,
Jesse
Jesse Hamner
Department of Political Science
Emory University
Atlanta, Georgia USA
More information about the grass-user
mailing list