Label | Explanation | Data Type |
Asset Package
| The input asset package that will be copied. | Workspace |
Output Spatial Reference
| The spatial reference of the new asset package. | Spatial Reference |
Folder Location
| The folder location where the asset package will be created. | Workspace |
Package Name
| The name of the output asset package. | String |
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.
Parameters
arcpy.pt.ChangeGDBSpatialReference(asset_package, spatial_reference, output_folder, output_name)
Name | Explanation | Data Type |
asset_package | The input asset package that will be copied. | Workspace |
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 |
output_name | The name of the output asset package. | String |
Code sample
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")
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