AddressPointsCopy = AddressPointsLayerName + str(rowcount) arcpy.CopyFeatures_management(AddressPointsLayerName, AddressPointsCopy) # A good idea to limit the number of RoadLinks to a sensible area around the address points # Will stick to 200 metres just to ensure we don't miss anything desc = arcpy.Describe(AddressPointsCopy).extent array = arcpy.Array() # Create the bounding box array.add(desc.lowerLeft) array.add(desc.lowerRight) array.add(desc.upperRight) array.add(desc.upperLeft) # ensure the polygon is closed array.add(desc.lowerLeft) # Create the polygon object message = "ARRAY " + str(array[0]) + " " + str(array[1]) + " " +str(array[2]) + " " +str(array[3]) + " " + str(array[4]) print message polygon = arcpy.Polygon(array) array.removeAll() # buffer extentPoly = layerMemory + os.sep + "RoadlinkBuffer" + str(rowcount) arcpy.Buffer_analysis(polygon, extentPoly, "200 meters", "OUTSIDE_ONLY", "FLAT", "NONE")
Solved! Go to Solution.