Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #get the polygon
- sC = arcpy.SearchCursor(polygon)
- for row in sC:
- polygonshape = row.Shape
- del sC
- #creation of the polyline(s):
- feature_info = [[[p1.x, p1.y], [x, y]], [[p2.x, p2.y], [x, y]], [[p3.x, p3.y], [x, y]]]
- features = []
- for feature in feature_info:
- array = arcpy.Array()
- for point in feature:
- P = arcpy.Point()
- P.X = point[0]
- P.Y = point[1]
- array.add(P)
- features.append(arcpy.Polyline(array))
- #the actual check:
- for item in features:
- in_poly = polygonshape.contains(item) #this is always false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement