Skip to content

Commit

Permalink
refac: change member of grid
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Guinet committed Dec 1, 2023
1 parent 26bbdba commit 213f20b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions shareloc/geofunctions/localization.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,10 @@ def inverse(self, lon, lat, h=None, using_geotransform=False):
:rtype: Tuple(1D np.ndarray row position, 1D np.ndarray col position, 1D np.ndarray alt)
"""

if not self.use_rpc and not hasattr(self.model, "pred_ofset_scale_lon"):
if not self.use_rpc:
# for grids only
self.model.estimate_inverse_loc_predictor()
if self.model.pred_ofset_scale_lon is None:
self.model.estimate_inverse_loc_predictor()
if h is None:
h = self.default_elevation

Expand Down

0 comments on commit 213f20b

Please sign in to comment.