Spaces:
Sleeping
Sleeping
mattritchey
commited on
Update main.py
Browse files
main.py
CHANGED
@@ -22,14 +22,10 @@ def root():
|
|
22 |
|
23 |
|
24 |
def lat_lon_to_row_col(lat, lon):
|
25 |
-
crs_dic = pickle.load(open('
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
row, col = rasterio.transform.rowcol(transform, lon_rtma, lat_rtma)
|
31 |
-
row, col = int(row), int(col)
|
32 |
-
return row, col
|
33 |
|
34 |
def geocode_address(address):
|
35 |
|
|
|
22 |
|
23 |
|
24 |
def lat_lon_to_row_col(lat, lon):
|
25 |
+
crs_dic = pickle.load(open('hrrr_crs.pkl', 'rb'))
|
26 |
+
lon_hrrr, lat_hrrr = crs_dic['proj_4326'].transform(lon, lat)
|
27 |
+
row, col = rasterio.transform.rowcol(crs_dic['affine'], lon_hrrr, lat_hrrr)
|
28 |
+
return int(row), int(col)
|
|
|
|
|
|
|
|
|
29 |
|
30 |
def geocode_address(address):
|
31 |
|