Closed 77freab closed 4 years ago
This library works on geometric coordinates x
and y
, it doesn't know anything about geographical coordinate systems and projections on purpose. To fix the case above, preprocess your coordinates so that they don't wrap (e.g. -179 should turn into 181).
oh, i'm sorry, i guess i misunderstood that algorithm takes lat,lon coordinates as it's map related. thanks for the hint though.
i'm surprised that through all this years nobody found this. e.g. something like (lat, lon) 66.835993985609136,179.53481017154348, 66.570003009644324,-179.76022250492355, 66.751380624020030,-179.47256342463140, 67.039144593094719,179.70497469791349, will give you wrong bounding box (like polygon goes along all earth surface) 66.570003009644324,-179.76022250492355, 67.039144593094719,179.70497469791349, and of course wrong center 66.937436163870117,179.45104221247121,