mattritchey commited on
Commit
2a2a3af
·
verified ·
1 Parent(s): 560c525

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +4 -8
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('Data/hrrr_crs.pkl', 'rb'))
26
- transform = crs_dic['affine']
27
- trans_rtma = crs_dic['proj_4326']
28
- lon_rtma, lat_rtma = trans_rtma.transform(lon, lat)
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