-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
Hello,
There seems to be a problem with the boundsOf function.
I guess it occurs when one of the pole is included in the polygon.
Here is a snippet to figure out the problem:
from pygeodesy.sphericalNvector import LatLon
from pygeodesy.points import boundsOf
square = [(-87, 169), (-87, 170), (-86, 170), (-86, 169)]
square_latlon = [LatLon(*vertex) for vertex in square]
poly = [(-53.123167265109586, -142.31549347964588),
(-56.18098637168117, -150.59345713564096),
(-61.21449183902621, -174.32775284700298),
(-60.924537261111254, 150.33105852563114),
(-59.41255092548878, 116.90184661596409),
(-55.96850597283981, 73.62965786693006),
(-58.22943736394686, 66.03709129230528),
(-61.44699148107358, 57.81181456237063),
(-66.53009631577717, 33.6500584396396),
(-78.524168110103, 4.735160439589678),
(-55.007664818434854, -127.16484351174928),
(-54.689657785955546, -127.41783959200605)]
poly_latlon = [LatLon(*vertex) for vertex in poly]
square_latlon[0].isenclosedBy(poly_latlon) # returns True
boundsOf(poly_latlon).overlap(boundsOf(square_latlon)) # returns None
Metadata
Metadata
Assignees
Labels
No labels