How do I sum the areas of polygons in multiple shapefiles?

12908
14
02-17-2015 05:55 PM
StephenWheeler
New Contributor

Hi All -- I have multiple geodatabases each with many shapefiles containing multiple polygons. I want to quickly and easily get the total area of polygons in each shapefile. I can't believe that ArcGIS is so cumbersome as to require me to add an Area field to each shapefile, calculate geometry, and then run statistics. Isn't there some simpler way to find out total area for each shape file?

 

Thanks so much for anyone's help! -- Steve Wheeler, U.C. Davis

0 Kudos
14 Replies
DarrenWiens2
MVP Honored Contributor

You can certainly automate the process with python (if that's how you want to go, please indicate).

However, if your data truly are in geodatabases (there is some confusion whether you're talking about geodatabases or folders of shapefiles), each feature class will already have the auto-populated field SHAPE_AREA. Then, right-click the field and Summarize to get the total, or batch process Summary Statistics on all feature classes to semi-automate the totals.

0 Kudos
StephenWheeler
New Contributor

Hi Darren -- Thanks so much for your answer. Probably the data is just in folders of shapefiles (not sure the exact definition of geodatabase). There isn't any SHAPE_AREA field on them. I don't know Python and don't want to get involved with scripts unless absolutely necessary....was hoping that at this point in its evolution ArcGIS was user-friendly enough to have some function to calculate area, which seems like such a basic thing.....What do you recommend?

Many thanks -- Steve

0 Kudos
DanPatterson_Retired
MVP Emeritus

Oh they exist...ArcScripts 2.0 is coming soon...

ToolTorture.png

0 Kudos
StephenWheeler
New Contributor

Hi Dan — Thanks, but where do i find Batch Calc APL? I don’t see it anywhere.

Steve

0 Kudos
DarrenWiens2
MVP Honored Contributor

This wouldn't take too long to do per folder simply through the GUI and batch processing. One batch for Add Field (area), one batch for Calculate Field, and finally Summary Statistics to add up the areas. Of course, if you have many folders, you'd want to automate it with a model or script.

0 Kudos
DanPatterson_Retired
MVP Emeritus

Not to mention the fact that some of the files will be using data in longitude and latitude.  This will require you to project the data, which in turn can yield slightly different values for the same area, particularly if the datums are different.  And we can't not mention that these calculations are all being done using some perhaps erroneous representation of true space...of course assuming everything was digitized and processed without error at the highest precision possible in the first place.  So it is no wonder that people that study coordinate systems, projections and their implications to geometric representation of space have a hard time sleeping at night.  And the poor surveys that have to collect these data with a high degree of accuracy only to have some cartographer cut corners...literally and figuratively... to make a map look better.

So my hat is off to people in that field of spatial data collection, geodesy and mapping like Melita ... Melita Kennedy

Then you raise that dreaded word ... statistics ... with the problems of collecting and representing space... someone wants to derive statistics.  It is bad enough that they will attempt to derive meaningful descriptive statistics ... nope...they don't stop there ... off they go trying to show spatial patterns or that things are different and ascribe a reason for it.

When will the madness end?  Grab a bunch of files in digital form for the same area ( a county perhaps) determine their geometry...take their average...and say 'about this big' ...  or 'we will need more money to fine-tune the estimate'.  So if you are on the receiving end of a request like this ... good luck ... if you are on the requesting end ... consider the above.

In jest of course ... or maybe some of it .

0 Kudos
DarrenWiens2
MVP Honored Contributor

^ but chances are it's not that bad

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

Hi Stephen,

In ArcCatalog, you could create a new File geodatabase (FGDB), and a feature dataset (Define an appropriate Projected coordinate system to it). You could then just import all the shapefiles to the feature dataset. This will take care of Creation of Shape_Area Field, and calculate geometry for all the feature classes.

Thanks,

Jay



Think Location
0 Kudos
StephenWheeler
New Contributor

Hi Jay — Thanks; that’s helpful. I’ll give it a try.

Steve

0 Kudos