Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-------------------------------------------------------------------------------
- # Name: Batch Project
- # Purpose: Batch Project Feature Classes
- #
- # Author: noah.huntington
- #
- # Created: 29/04/2015
- # Copyright: (c) noah.huntington 2015
- # Licence: <your licence>
- #-------------------------------------------------------------------------------
- import arcpy
- # Local variables:
- workspace = arcpy.env.workspace = arcpy.GetParameterAsText(0)
- outPath = arcpy.CreateFolder_management(arcpy.GetParameterAsText(1), arcpy.GetParameterAsText(2))
- # Use the ListFeatureClasses function to return a list of
- # shapefiles.
- featureclasses = arcpy.ListFeatureClasses()
- dataset = arcpy.GetParameterAsText(3)
- spatial_ref = arcpy.Describe(dataset).spatialReference
- # Copy shapefiles to a file geodatabase
- for fc in featureclasses:
- project_list = []
- project_list.append(fc)
- arcpy.BatchProject_management(project_list,outPath,spatial_ref)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement