Add Feature Class To Topology (Data Management)

Available with Standard or Advanced license.

Summary

Adds a feature class to a topology.

Usage

  • The new feature class must be in the same feature dataset as the topology.

  • Adding a new feature class to a topology automatically makes the entire topology dirty, so when you finish adding feature classes, you need to revalidate the topology. The new features may create errors where previously there were none depending on the topology rules associated with the feature class.

  • Feature classes can only be added to topologies with the same versioned status. For example, a versioned feature class can be added to a versioned topology, but a nonversioned feature class cannot be added to a versioned topology.

  • If the feature class you are adding is z-aware, you can rank the relative accuracy of the feature class by elevation by setting the z rank for the feature class.

  • When adding a feature class to a topology, you must specify the rank of the vertices in this feature class relative to those in other feature classes. When validation of the topology cracks and clusters feature vertices, vertices from feature classes assigned a higher rank will not be moved when snapping with vertices with lower-ranked feature classes. The highest rank is 1, and you can assign up to 50 different rank values.

Parameters

LabelExplanationData Type
Input Topology

The topology to which the feature class will be added.

Topology Layer
Input Feature class

The feature class that will be added to the topology. The feature class must be in the same feature dataset as the topology.

Feature Layer
XY Rank

The relative degree of positional accuracy associated with vertices of features in the feature class versus those in other feature classes in the topology. The feature class with the highest accuracy receives a higher rank (lower number, for example, 1) than a feature class that is known to be less accurate.

Long
Z Rank

Feature classes that are z-aware have elevation values embedded in their geometry for each vertex. By setting a z rank, you can influence how vertices with accurate z-values are snapped or clustered with vertices that contain less accurate z measurements.

Long

Derived Output

LabelExplanationData Type
Updated Input Topology

The updated topology.

Topology Layer

arcpy.management.AddFeatureClassToTopology(in_topology, in_featureclass, xy_rank, z_rank)
NameExplanationData Type
in_topology

The topology to which the feature class will be added.

Topology Layer
in_featureclass

The feature class that will be added to the topology. The feature class must be in the same feature dataset as the topology.

Feature Layer
xy_rank

The relative degree of positional accuracy associated with vertices of features in the feature class versus those in other feature classes in the topology. The feature class with the highest accuracy receives a higher rank (lower number, for example, 1) than a feature class that is known to be less accurate.

Long
z_rank

Feature classes that are z-aware have elevation values embedded in their geometry for each vertex. By setting a z rank, you can influence how vertices with accurate z-values are snapped or clustered with vertices that contain less accurate z measurements.

Long

Derived Output

NameExplanationData Type
out_topology

The updated topology.

Topology Layer

Code sample

AddFeatureClassToTopology example (stand-alone script)

The following stand-alone script demonstrates how to use the AddFeatureClassToTopology function.


# Name: AddFeatureClassToTopology_Example.py
# Description: Adds a feature class to participate in a topology

# Import system modules
import arcpy

arcpy.management.AddFeatureClassToTopology("D:/Calgary/Trans.gdb/Streets/Street_Topo", "D:/Calgary/Trans.gdb/Streets/StreetNetwork", 1, 1)

Environments

Related topics