Is there a way to check if a polyline/line is partially inside an extent ?
I tried extent.contains, but it only returns true if the whole line is inside the extent,even if little part of it lies outside the extent then it return false. Is there a way to solve this ?
Thanks.
Solved! Go to Solution.
You want intersects, which will return true if any part of the line is within the extent.
Edit: if you want to check for being partially within only, you could check that intersects returns true and contains returns false.
You want intersects, which will return true if any part of the line is within the extent.
Edit: if you want to check for being partially within only, you could check that intersects returns true and contains returns false.
I'd probably look at if extent.disjoint True/False which may be faster than an intersection (just a guess though).
Though the data is not much, I'll still look into this.
Thanks.