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
Is your feature request related to a problem? Please describe.
Related to #27
If a bounding box crosses the international dateline, then checking if an image/map feature point falls inside the bbox could fail.
For example if the bbox of [west,south,east,north] is: [174.375,-20.879342971957897,-169.5849609375,-11.566143767762844]
And a point is located at: (178.5498046875,-17.936928637549432)
Then the longitude of 178.54 will be > the west value longitude of 174.37 but also > the east value of -169.5849609375
Then it would return as false for a check to see if it is inside a bbox. It should be < the east value to pass the check.
If the west is a negative and the east is a positive, there is not a problem, only the inverse where west is positive and east is negative.
Describe the solution you'd like
We should do a dateline check, like:
bbox = [west,south,east,north] # these should be int values, using names for example here
if west is a positive number and east is a negative value:
new_east = east + 360
bbox = [west,south,new_east,north]
Describe alternatives you've considered
Considered generating a linestring geometry representing the dateline/antemeridian and checking if the bbox geometry intersects it, but this is a more expensive computation
Additional context
The issue here over is that the dateline is where the +/-180 degrees of a sphere "resets" from positive to negative, which can break out bbox check
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Related to #27
If a bounding box crosses the international dateline, then checking if an image/map feature point falls inside the bbox could fail.
For example if the bbox of [west,south,east,north] is: [174.375,-20.879342971957897,-169.5849609375,-11.566143767762844]
And a point is located at: (178.5498046875,-17.936928637549432)
Then the longitude of 178.54 will be > the west value longitude of 174.37 but also > the east value of -169.5849609375
Then it would return as false for a check to see if it is inside a bbox. It should be < the east value to pass the check.
If the west is a negative and the east is a positive, there is not a problem, only the inverse where west is positive and east is negative.
Describe the solution you'd like
We should do a dateline check, like:
Describe alternatives you've considered
Considered generating a linestring geometry representing the dateline/antemeridian and checking if the bbox geometry intersects it, but this is a more expensive computation
Additional context
The issue here over is that the dateline is where the +/-180 degrees of a sphere "resets" from positive to negative, which can break out bbox check
The text was updated successfully, but these errors were encountered: