New answers tagged shapely
Something like this? import arcpy for polygon in arcpy.SearchCursor("path/to/polygon file"): feature = polygon.shape # Set the base geom to each polygon for point in arcpy.SearchCursor("path/to/point file"): feature2 = point.shape # Set the comparison geometry to each point print "Point %d is within polygon %d: %s" % ...
The Shapely method object.within(other) looks tailored for your purpose. You may also be interested in object.touches(other).
Top 50 recent answers are included