Skip to content

Instantly share code, notes, and snippets.

@maptastik
Created October 24, 2016 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maptastik/1f75d5f8bf7fd44e50a2f69b3a176326 to your computer and use it in GitHub Desktop.
Save maptastik/1f75d5f8bf7fd44e50a2f69b3a176326 to your computer and use it in GitHub Desktop.
Pile of garbage python to clip a bunch of vector layers by a single vector layer in arcgis
# This requires arcpy and having ArcGIS open
# Maybe this is the beginning of something useful
# Right now it's just conceptually something taht can be used to clip a bunch of layers by the same feature
import arcpy
layers = ["BRIDGE","MUNICIPAL","FENCE","HYDRO_LINE","RR","BUILDING","AUC","PARKING","ROADS","HYDRO_POLY","Parcels","Contours"]
clipper = "IndianCreekRd_1_buff100"
i = 0
while (i < len(layers))
arcpy.Clip_analysis(layers[i],clipper, "IndianCreek_1_"+layers[i]
print "Clipping " + layers[i]
i += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment