Check Geometry (Data Management) |
|
Release 9.2
Last modified November 29, 2010 |
![]() ![]() ![]() Print all topics in : "Tools" |
Inspects each feature's geometry for problems. Valid input formats are shapefile and feature classes stored in a personal geodatabase or file geodatabase. SDE Geodatabases automatically check each geometry's validity when it is uploaded, therefore the Check and Repair Geometry tools are not for use with SDE.
Usage tips
The Output table will have one record for each problem found. If no problems are found, the Output table will have no records.
The Output table has the following fields:
The PROBLEM field will contain one of the following:
For multipoint features, only the null geometry and empty part problems apply.
For point features, only the null geometry problem applies.
The problem identified by this tool can be fixed in the following ways:
The following environment setting affects this tool: Extent.
To facilitate the review of the features which are reported to have geometry problems, in ArcMap you can join the input features to the output table using the Join tool. Simply join using the input's ObjectID field, and the output table's FEATURE_ID field. You may also uncheck the "Keep All" option so that only features with geometry problems are displayed.
Command line syntax
An overview of the Command Line window
CheckGeometry_management <in_features;in_features...> <out_table>
Parameter | Explanation | Data Type |
<in_features;in_features...> |
One or more feature classes or feature layers that will be checked for geometry problems. Valid input formats are shapefile and feature classes stored in a personal geodatabase or file geodatabase. |
Feature Layer |
<out_table> |
The table that will contain the list of problems that were discovered. |
Table |
workspace c:\ws\St_Lucia.mdb CheckGeometry (contours ; roads ; vegetation ) CGResult
Scripting syntax
About getting started with writing geoprocessing scripts
CheckGeometry_management (in_features, out_table)
Parameter | Explanation | Data Type |
in_features (Required) |
One or more feature classes or feature layers that will be checked for geometry problems. Valid input formats are shapefile and feature classes stored in a personal geodatabase or file geodatabase. |
Feature Layer |
out_table (Required) |
The table that will contain the list of problems that were discovered. |
Table |
# BatchCheckGeometry.py # Description: # Loops through all the feature classes in a geodatabase, and generates # a report of the problems encountered with feature geometry. # Requirements: Python and the Python win32all extension # Author: ESRI # Data 1/1/2004 # Create the Geoprocessor import arcgisscripting gp = arcgisscripting.create() inWorkspace = 'C:/ws/St_Lucia.mdb' outTable = 'C:/ws/St_Lucia.mdb/checkGeometryResult' # The workspace in which the feature classes will be checked gp.workspace = inWorkspace # A variable that will hold the list of all the feature classes (separated by semicolon) inFeatureClasses = "" # List all feature classes in feature datasets fdss = gp.ListDatasets("","featuredataset") fds = fdss.Next() while fds: fcs = gp.ListFeatureClasses("*","",fds) fc = fcs.Next() while fc: if inFeatureClasses == "": inFeatureClasses = fds + "/" + fc else: inFeatureClasses = inFeatureClasses + ";" + fds + "/" + fc fc = fcs.Next() fds = fdss.Next() # List all standalone feature classes fcs = gp.ListFeatureClasses() fc = fcs.Next() while fc: if inFeatureClasses == "": inFeatureClasses = fc else: inFeatureClasses = inFeatureClasses + ";" + fc fc = fcs.Next() # Put a try except look around the tool, in case an error occurs try: print "Running the check geometry tool on %i feature classes" % len(inFeatureClasses.split(";")) gp.CheckGeometry(inFeatureClasses, outTable) print "%i problems were found, see %s" % (gp.GetCount(outTable), outTable) except: # If an error occurred, print the messages returned by the tool print gp.GetMessages() print "FINISHED"