You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A region of interest should be able to determine whether a point (x, y) lies within the region. I had a go with this in #390 before the scope drift, so there's some relevant code here to start from.
Key things to bear in mind are how the underlying shapely objects treat the terms "inside", "on", and "contains". In particular, the shapelyis_inside method does not include the boundary, but I imagine most of our users will want the boundary included by default, or at least the option to toggle it off.
As such, I envision a method being added to the BaseRegionOfInterest class that has the following signature:
classBaseRegionOfInterest:
defpoint_is_inside(self, xy_position, include_boundary=True) ->bool:
# Likely some calls to shapely commands
Once the broadcasting decorator #397 is added, this method can be decorated with the broadcastable_classmethod decorator too. (Whether we do this in the same PR that introduces the point_is_inside method will depend on if #397 is merged beforehand).
The text was updated successfully, but these errors were encountered:
Subtask of #377.
A region of interest should be able to determine whether a point
(x, y)
lies within the region. I had a go with this in #390 before the scope drift, so there's some relevant code here to start from.Key things to bear in mind are how the underlying
shapely
objects treat the terms "inside", "on", and "contains". In particular, theshapely
is_inside
method does not include the boundary, but I imagine most of our users will want the boundary included by default, or at least the option to toggle it off.As such, I envision a method being added to the
BaseRegionOfInterest
class that has the following signature:Once the broadcasting decorator #397 is added, this method can be decorated with the
broadcastable_classmethod
decorator too. (Whether we do this in the same PR that introduces thepoint_is_inside
method will depend on if #397 is merged beforehand).The text was updated successfully, but these errors were encountered: