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

Recalculate Feature Class Extent

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

Summary

Recalculates the XY, Z, and M extent properties of a feature class based on the features in the feature class.

A feature class has a spatial extent that is based on all the coordinates in the feature class. This spatial extent is used when adding a feature class to a map to recenter and display all the features. Rather than examining every feature in the feature class each time the feature class is added to a map (a potentially long process), a feature class has an extent property containing the last known spatial extent. However, this extent property is not always updated when features in the feature class are edited. This means that the values in the extent property may not contain the actual spatial extent of the features. Executing this tool reads all the features and updates the extent property.

Note:

XY, Z, and M extents are not the same as spatial reference domains. The XY, Z, and M domains in a spatial reference define the valid range of coordinate values that can be stored in a feature class. The feature class extents reflect the actual range of coordinate values that exist in the feature class. These extents cannot be larger than the domains.

Usage

  • Recalculate Feature Class Extent updates geodatabase feature classes or shapefiles (point, multipoint, line, or polygon).

  • In an enterprise geodatabase, extent is a property of the feature class schema and requires an exclusive schema lock to execute.

  • When using this tool with an enterprise geodatabase feature class as input, the extent is calculated based on the features that exist in that feature class in all versions. The extent will not shrink or expand unless this tool is run after the database has been compressed.

  • This tool will fail if you do not have permissions to edit the feature class.

  • Recalculating the feature class extent cannot be undone.

  • The values of the extent are returned by the arcpy.Describe function's extent property.

  • This tool performs the same operation as opening the Feature Class Properties in ArcCatalog or the Catalog Window in ArcMap, choosing the Feature Extent tab, and clicking Recalculate in the appropriate Extent section.

  • Caution:

    This tool modifies the input data. See Tools with no outputs for more information and strategies to avoid undesired data changes.

Syntax

arcpy.management.RecalculateFeatureClassExtent(in_features)
ParameterExplanationData Type
in_features

The shapefile or geodatabase feature class that will be updated.

Feature Layer

Derived Output

NameExplanationData Type
out_features

The updated feature class.

Feature Class

Code sample

RecalculateFeatureClassExtent example (Python window)

The following Python window script demonstrates how to use the RecalculateFeatureClassExtent tool in immediate mode. It recalculates the XY, M, or Z extent of a feature class.

import arcpy
feature_class = r"C:\Data\europe.gdb\norway_cities"
arcpy.RecalculateFeatureClassExtent_management(feature_class)

Environments

  • Current Workspace
  • Scratch Workspace

Licensing information

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

Related topics

  • An overview of the Feature Class toolset

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