ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Calculate Areas

  • Summary
  • Illustration
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

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

Legacy:

Because there are easier and more efficient ways to get the area of features, the Calculate Areas tool has been deprecated. Use the Calculate Field tool or the Geometry Calculator instead of the Calculate Areas tool in your workflows and custom script or models tools. If you are using feature classes in a geodatabase, the shape_area attribute field is maintained for you automatically.

Illustration

Calculate Areas illustration

Usage

  • The F_AREA field created in the Output Feature Class will be populated with values for the area of each polygon feature in square units of the Output Coordinate System.

  • There are alternative methods for creating an Area field for polygon features including: Calculate Field and the Geometry Calculator.

  • The Output Feature Class is a copy of the Input Feature Class with the additional (or updated) F_AREA field containing polygon areas.

  • Caution:

    The F_AREA field is created in the Output Feature Class to store calculated Area values. If a field of this name already exists in the Input Feature Class, it will be overwritten in the Output Feature Class.

    Caution:

    When using shapefiles, keep in mind that they cannot store null values. Tools or other procedures that create shapefiles from nonshapefile inputs may store or interpret null values as zero. In some cases, nulls are stored as very large negative values in shapefiles. This can lead to unexpected results. See Geoprocessing considerations for shapefile output for more information.

Syntax

arcpy.stats.CalculateAreas(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
    Note:

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

  • Current Workspace
  • Scratch Workspace
  • Qualified Field Names
  • Output has M values
  • Output has Z values
  • Default Output Z Value

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal