shareloc.geomodels.geomodel_template
This module contains the GeoModel abstract class
Classes
Class for general specification of a geometric model |
Module Contents
- class shareloc.geomodels.geomodel_template.GeoModelTemplate[source]
Class for general specification of a geometric model declined in rpc.py and grid.py and rpc_optim.py
- abstract direct_loc_h(row, col, alt, fill_nan=False)[source]
direct localization at constant altitude
- Parameters:
row (float or 1D numpy.ndarray dtype=float64) – line sensor position
col (float or 1D numpy.ndarray dtype=float64) – column sensor position
alt – altitude
fill_nan (boolean) – fill numpy.nan values with lon and lat offset if true (same as OTB/OSSIM), nan is returned otherwise
- Returns:
ground position (lon,lat,h)
- Return type:
numpy.ndarray 2D dimension with (N,3) shape, where N is number of input coordinates
- abstract direct_loc_dtm(row, col, dtm)[source]
direct localization on dtm
- Parameters:
row (float) – line sensor position
col (float) – column sensor position
dtm (shareloc.geofunctions.dtm_intersection) – dtm intersection model
- Returns:
ground position (lon,lat,h) in dtm coordinates system
- Return type:
numpy.ndarray 2D dimension with (N,3) shape, where N is number of input coordinates
- abstract inverse_loc(lon, lat, alt)[source]
Inverse localization
- Parameters:
lon (float or 1D numpy.ndarray dtype=float64) – longitude position
lat (float or 1D numpy.ndarray dtype=float64) – latitude position
alt (float) – altitude
- Returns:
sensor position (row, col, alt)
- Return type:
tuple(1D np.array row position, 1D np.array col position, 1D np.array alt)
- classmethod load(geomodel_path)[source]
- Abstractmethod:
- Parameters:
geomodel_path (str)
load function with class specific args
- Parameters:
geomodel_path (str) – filename of geomodel
- check_lonlat(lonlath)[source]
returns filtered latlonh. abs(longitude) should be <= 180, abs(latitude) should be <=90, and no NaN in coordinates.
- Parameters:
latlonh – np.array of latlonh
lonlath (numpy.ndarray)
- Returns:
filtered array
- Return type:
numpy.ndarray
- get_dtm_alt_offset(corners, dtm)[source]
returns min/max altitude offset between dtm coordinates system and Geomodel one
- Parameters:
corners (np.ndarray (4x2)) – corners of the DTM’s footprint
dtm (DTMIntersection or bindings_cpp.DTMIntersection) – DTM to get alt offset from
- Returns:
min/max altimetric difference between RPC’s epsg minus dtm alti expressed in dtm epsg
- Return type:
list of float (1x2)