Validate Topology (Data Management)

Summary

Validates a geodatabase topology.

This tool performs the following operations:

  • Cracking and clustering of feature vertices to find features that share geometry (have common coordinates)
  • Inserting common coordinate vertices into features that share geometry
  • Running a set of integrity checks to identify any violations of the rules that have been defined for the topology

Usage

  • Specific portions of a topology can be validated using the Extent environment and checking the Use extent environment parameter.

  • This tool will only process dirty areas. To learn more about dirty areas, see Topology in ArcGIS.

  • Starting at ArcGIS Pro 2.6, the input topology layer can be from a topology service if the service is published with ArcGIS Enterprise 10.8.1 or later. If the layer has been added to the Contents pane, you can drag the layer to the Input Topology parameter, or you can provide the URL of the topology layer feature service, for example, https://myserver.mydomain.com/server/rest/services/myTopoService/FeatureServer/0.

  • When the input topology is from a feature service, this tool performs the validate process asynchronously.

    License:
    When working with branch versioning in an ArcGIS Enterprise 11.2 or later deployment, organization members must be assigned a license for the ArcGIS Advanced Editing user type extension to use this tool.

Parameters

LabelExplanationData Type
Input Topology

The geodatabase topology that will be validated.

Topology Layer
Use extent environment
(Optional)

Specifies whether the Extent environment value for the topology or the full extent of the topology will be validated.

  • Checked—The Extent environment value for the topology will be validated. If the environment has not been set, the full extent will be validated.
  • Unchecked—The full extent of the topology will be validated. This is the default.

Boolean

Derived Output

LabelExplanationData Type
Updated Input Topology

The updated topology.

Topology Layer

arcpy.management.ValidateTopology(in_topology, {visible_extent})
NameExplanationData Type
in_topology

The geodatabase topology that will be validated.

Topology Layer
visible_extent
(Optional)

Specifies whether the current visible extent of the map or the full extent of the topology will be validated.

  • Visible_Extent The current visible extent of the map will be validated.
  • Full_ExtentThe full extent of the topology will be validated. This is the default.
Boolean

Derived Output

NameExplanationData Type
out_topology

The updated topology.

Topology Layer

Code sample

ValidateTopology example 1 (stand-alone script)

The following stand-alone script demonstrates how to use the ValidateTopology function:

import arcpy
arcpy.management.ValidateTopology("D:/Calgary/Trans.gdb/Streets/Street_Topo")
ValidateTopology example 2 (stand-alone script)

The following stand-alone script demonstrates how to use the ValidateTopology function with an extent:

# Name: ValidateTopology_Example.py
# Description: Validates a topology using the environment extent (visible map display)

import arcpy
processing_extent = arcpy.Extent(
    2357129.94288309, 1424105.53783632, 2573455.6694351, 1663482.36639798,
    spatial_reference=arcpy.SpatialReference(102758, vcs=5703)
)

# Use EnvManager to temporarily set the Extent environment for the duration of
# the with block.
with arcpy.EnvManager(extent=processing_extent):
    arcpy.management.ValidateTopology("D:/Calgary/Transport.gdb/Streets/Street_Topo")

Environments

Licensing information

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

Related topics