From 8da40eb0cef6d9632f7b52176fb7ec014c27a100 Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Tue, 7 Sep 2021 09:56:41 -0500
Subject: [PATCH] snapshot...

---
 modules/util/lon_lat_grid.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/util/lon_lat_grid.py b/modules/util/lon_lat_grid.py
index f14c779e..73cffdf3 100644
--- a/modules/util/lon_lat_grid.py
+++ b/modules/util/lon_lat_grid.py
@@ -44,6 +44,8 @@ class LonLatGrid:
 
         flons = flons[keep]
         flats = flats[keep]
+        self.lon_lo, self.lon_hi = flons.min(), flons.max()
+        self.lat_lo, self.lat_hi = flats.min(), flats.max()
 
         points = np.stack([flons, flats], axis=1)
 
@@ -177,6 +179,9 @@ class LonLatGrid:
 
         return outv
 
+    def check_inside(self, lon, lat):
+        return (self.lon_lo < lon < self.lon_hi) & (self.lat_lo < lat < self.lat_hi)
+
 
 DEG_TO_RAD = np.pi/180.0;
 RAD_TO_DEG = 180.0/np.pi;
-- 
GitLab