From c5f7a0f264284281ec5dda196c4a97a41a8bdb89 Mon Sep 17 00:00:00 2001 From: josidd <joseph.siddons@noc.ac.uk> Date: Tue, 15 Oct 2024 07:47:02 +0100 Subject: [PATCH] fix: ensure lon is -180, 180 in Ellipse class --- GeoSpatialTools/quadtree.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/GeoSpatialTools/quadtree.py b/GeoSpatialTools/quadtree.py index cf41cc6..152b90b 100644 --- a/GeoSpatialTools/quadtree.py +++ b/GeoSpatialTools/quadtree.py @@ -240,6 +240,8 @@ class Ellipse: self.a = a self.b = b self.lon = lon + if self.lon > 180: + self.lon = ((self.lon + 540) % 360) - 180 self.lat = lat # theta is anti-clockwise angle from horizontal in radians self.theta = theta -- GitLab