From 643a8ff57f22e2988a3568d0b1a638d96384b4fd Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Wed, 28 Aug 2024 15:41:39 -0400 Subject: [PATCH] fix geospatial range check --- pywcmp/wcmp2/ets.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pywcmp/wcmp2/ets.py b/pywcmp/wcmp2/ets.py index a3e0b66..14e07c9 100644 --- a/pywcmp/wcmp2/ets.py +++ b/pywcmp/wcmp2/ets.py @@ -240,13 +240,10 @@ def test_requirement_extent_geospatial(self): geometry = shape(self.record['geometry']) bounds = geometry.bounds - x_range = range(-180, 180) - y_range = range(-90, 90) - - if not all([bounds[0] in x_range, - bounds[1] in y_range, - bounds[2] in x_range, - bounds[3] in y_range]): + if not all([-180 <= bounds[0] <= 180, + -90 <= bounds[1] <= 90, + -180 <= bounds[2] <= 180, + -90 <= bounds[3] <= 90]): status['code'] = 'FAILED' status['messsage'] = 'Invalid geometry'