maptastik
10/24/2016 - 8:13 PM

Pile of garbage python to clip a bunch of vector layers by a single vector layer in arcgis

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