Python code for Iterating through feature classes in a gdb to define projection
import arcpy
# Set the workspace environmentarcpy.env.workspace = r"C:\Users\abuelmc\Alignment.gdb" # Get a list of the feature classes in the input folderfeature_classes = arcpy.ListFeatureClasses() # Loop through the listfor fc in feature_classes: sr = arcpy.SpatialReference(3123) arcpy.DefineProjection_management(fc, sr)
Comments
Post a Comment