Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import arcpy
- Route = arcpy.GetParameterAsText(0)
- Masterline = arcpy.GetParameterAsText(1)
- MilepostLayer = arcpy.GetParameterAsText(2)
- WorkingGDB = arcpy.GetParameterAsText(3)
- spRef = arcpy.SpatialReference("WGS 1984")
- arcpy.MakeFeatureLayer_management(MilepostLayer, "MP_Layer")
- arcpy.SelectLayerByLocation_management("MP_Layer", "INTERSECT", Route, "1 FEET")
- arcpy.FeatureClassToFeatureClass_conversion("MP_Layer", "in_memory", "MP")
- arcpy.Near_analysis("in_memory/MP", Route, "10 FEET", "LOCATION")
- arcpy.TableToTable_conversion("in_memory/MP", "in_memory", "MPNearTable")
- arcpy.MakeXYEventLayer_management("in_memory/MPNearTable", "Near_X", "Near_Y", WorkingGDB + "/" + "TEST", spRef)
Add Comment
Please, Sign In to add comment