Calculate Areas (Spatial Statistics)

License Level:BasicStandardAdvanced

Summary

Calculates area values for each feature in a polygon feature class.

LegacyLegacy:

This tool will be deprecated in a future release of ArcGIS; there are better methods for obtaining polygon areas, including: Calculate_Field and the Geometry Calculator.

Illustration

Calculate Areas illustration

Usage

Syntax

CalculateAreas_stats (Input_Feature_Class, Output_Feature_Class)
ParameterExplanationData Type
Input_Feature_Class

The input polygon feature class.

Feature Layer
Output_Feature_Class

The output feature class. This feature class is a copy of the input feature class with field F_AREA added (or updated). The F_AREA field contains the polygon area.

Feature Class

Code Sample

CalculateAreas Example (Python Window)

The following Python Window script demonstrates how to use the CalculateAreas tool.

import arcpy
arcpy.env.workspace = "c:/data"
arcpy.CalculateAreas_stats("tracts.shp", "tracts_with_area_field.shp")
CalculateAreas Example (stand-alone Python script)

The following stand-alone Python script demonstrates how to use the CalculateAreas tool.

# Calculate AREA values
 
# Import system modules
import arcpy
 
# Local variables...
workspace = "C:/data"
input = "tracts.shp"
calculate_output = "tracts_with_area_field.shp"
 
try:
    # Set the current workspace (to avoid having to specify the full path to the feature classes each time)
    arcpy.env.workspace = workspace
 
    # Process: Calculate Areas...
    arcpy.CalculateAreas_stats(input, calculate_output)
 
except:
    # If an error occurred when running the tool, print out the error message.
    print arcpy.GetMessages()

Environments

Output Coordinate System

Feature geometry is projected to the Output Coordinate System prior to analysis.

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
8/26/2014