Change Asset Package Spatial Reference

Summary

Creates a new file geodatabase which models the asset package schema in the user-specified spatial reference.

Usage

  • The data in the asset package tables will be copied as they represent the schema of the utility network. C_ tables and other feature classes will be copied without data.

Syntax

arcpy.NOALIAS.ChangeGDBSpatialReference(asset_package, spatial_reference, output_folder, output_name)
NameExplanationData Type
asset_package

The input asset package that will be copied.

Workspace
Asset Package

The input asset package that will be copied.

Workspace
spatial_reference

The spatial reference of the new asset package.

Spatial Reference
Output Spatial Reference

The spatial reference of the new asset package.

Spatial Reference
output_folder

The folder location where the asset package will be created.

Workspace
Folder Location

The folder location where the asset package will be created.

Workspace
output_name

The name of the output asset package.

String
Package Name

The name of the output asset package.

String
ChangeGDBSpatialReference example (Python window)

The following Python window script demonstrates how to use the ChangeGDBSpatialReference tool in immediate mode.

arcpy.pt.ChangeGDBSpatialReference("D:/data/ElectricNetwork.gdb", arcpy.SpatialReference(2801), "D:/data", "ElectricNetwork_2801")
ChangeGDBSpatialReference (stand-alone script)

The following stand-alone script demonstrates how to use the ChangeGDBSpatialReference tool.

# Name: ChangeGDBSpatialReference.py
# Description: Changes the spatial reference of the asset package
 
# Import system modules
import arcpy
 
# Set local variables
asset_package = "D:/data/ElectricNetwork.gdb"
spatial_reference = arcpy.SpatialReference(2801)
folder = "D:/data"
name = "ElectricNetwork_2801"
 
# Change spatial reference to Louisiana SPCS South
arcpy.pt.ChangeGDBSpatialReference(asset_package, spatial_reference, folder, name)

Environments

Licensing information

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