Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -54,10 +54,12 @@ def get_hail_data(address, start_date, end_date, radius_miles, get_max):
|
|
54 |
lat, lon= geocode_address(address)
|
55 |
|
56 |
# Convert Lat Lon to row & col on Array
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
|
|
|
|
61 |
|
62 |
|
63 |
# files = [
|
|
|
54 |
lat, lon= geocode_address(address)
|
55 |
|
56 |
# Convert Lat Lon to row & col on Array
|
57 |
+
try:
|
58 |
+
transform = pickle.load(open('Data/transform_mrms.pkl', 'rb'))
|
59 |
+
|
60 |
+
row, col = rasterio.transform.rowcol(transform, lon, lat)
|
61 |
+
except:
|
62 |
+
row=col=None
|
63 |
|
64 |
|
65 |
# files = [
|