Skip to content

Commit

Permalink
refac: moved espg member to geomodeltemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Guinet committed Dec 1, 2023
1 parent 213f20b commit bf9df23
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions shareloc/geomodels/geomodel_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ def __init__(self):
"""
# geomodel type. Set by the subclass
self.type: str
# geomodel epsg projection code
self.epsg: int = None

# Define GeoModelTemplate functions interface

Expand Down
1 change: 0 additions & 1 deletion shareloc/geomodels/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ def __init__(self, geomodel_path: str):
self.alts_down = None
self.rowmax = None
self.colmax = None
self.epsg = 0

# inverse loc predictor attributes
self.pred_col_min = None
Expand Down
15 changes: 12 additions & 3 deletions shareloc/geomodels/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
# Set numba type of threading layer before parallel target compilation
config.THREADING_LAYER = "omp"

# pylint: disable=no-member


@GeoModel.register("RPC")
class RPC(GeoModelTemplate):
Expand All @@ -53,7 +51,18 @@ class RPC(GeoModelTemplate):
# pylint: disable=too-many-instance-attributes
def __init__(self, rpc_params):
super().__init__()
self.epsg = None

self.offset_alt = None
self.scale_alt = None
self.offset_col = None
self.scale_col = None
self.offset_row = None
self.scale_row = None
self.offset_x = None
self.scale_x = None
self.offset_y = None
self.scale_y = None

self.datum = None
for key, value in rpc_params.items():
setattr(self, key, value)
Expand Down

0 comments on commit bf9df23

Please sign in to comment.