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

Import Topology

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

Summary

Creates a geodatabase topology from a definition .xml file generated by the ArcGIS Defense Mapping solution's Export Topology tool. Both this tool and the Export Topology tool allow you to share and create topologies within different geodatabases. The .xml file contains a definition of a topology, including feature class names, topology ranks, topology rules, and cluster tolerance.

Usage

  • This tool supports all data models, with a properly configured .xml definition file, and can be used on any feature dataset.

Syntax

arcpy.defense.ImportTopology(in_feature_dataset, topology_definition_file)
ParameterExplanationData Type
in_feature_dataset

The feature dataset in which the topology will be created. The feature dataset must contain the feature classes listed in the topology_definition_file.

Feature Dataset
topology_definition_file

The .xml file that contains the topology definition.

File

Derived Output

NameExplanationData Type
out_topology

Output topology created by importing topology rules from the topology XML file.

Topology

Code sample

ImportTopology example (Python window)

The following Python window script demonstrates how to use the ImportTopology tool.

# Local variables
featuredataset="C:\\data\\MX_GTDS_4_0.gdb\\GTDS"
topologyfile="C:\\data\\gtdsTopo.xml"

# execute the tool
arcpy.ImportTopology_defense(featuredataset,topologyfile)

# print out the topology name
arcpy.env.workspace=featuredataset
for t in arcpy.ListDatasets("*","Topology"):
     print t

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Requires Defense Mapping
  • Advanced: Requires Defense Mapping

Related topics

  • An overview of the Topology toolset
  • Topology basics
  • Topology in ArcGIS

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