shareloc.geomodels.rpc_optim ============================ .. py:module:: shareloc.geomodels.rpc_optim .. autoapi-nested-parse:: This module contains the optimized (with cpp bindings) RPC class corresponding to the RPC models. RPC models covered are : DIMAP V1, DIMAP V2, DIMAP V3, ossim (geom file), geotiff. Classes ------- .. autoapisummary:: shareloc.geomodels.rpc_optim.RPCoptim Module Contents --------------- .. py:class:: RPCoptim(rpc_params) Bases: :py:obj:`bindings_cpp.RPC`, :py:obj:`shareloc.geomodels.geomodel_template.GeoModelTemplate` RPC optimized with cpp bindings class including direct and inverse localization instance methods .. py:attribute:: type :value: 'RPCoptim' .. py:attribute:: col0 .. py:attribute:: colmax .. py:attribute:: row0 .. py:attribute:: rowmax .. py:attribute:: epsg :value: 4326 .. py:method:: load(geomodel_path) :classmethod: Load from any RPC (auto identify driver) from filename (dimap, ossim kwl, geotiff) TODO: topleftconvention always to True, set a standard and remove the option topleftconvention boolean: [0,0] position If False : [0,0] is at the center of the Top Left pixel If True : [0,0] is at the top left of the Top Left pixel (OSSIM) .. py:method:: direct_loc_h(row, col, alt, fill_nan=False, using_direct_coef=False) direct localization at constant altitude :param row: line sensor position :type row: float or 1D numpy.ndarray dtype=float64 :param col: column sensor position :type col: float or 1D numpy.ndarray dtype=float64 :param alt: altitude :param fill_nan: fill numpy.nan values with lon and lat offset if true (same as OTB/OSSIM), nan is returned otherwise :type fill_nan: boolean :return: ground position (lon,lat,h) :rtype: numpy.ndarray 2D dimension with (N,3) shape, where N is number of input coordinates .. py:method:: direct_loc_dtm(row, col, dtm) direct localization on dtm only if dtm's epsg code is 4326 :param row: line sensor position :type row: list or np.array :param col: column sensor position :type col: list or np.array :param dtm: dtm intersection c++ model :type dtm: shareloc.bindings.dtm_intersection.cpp :return: ground position (lon,lat,h) in dtm coordinates system :rtype: numpy.ndarray 2D dimension with (N,3) shape, where N is number of input coordinates .. py:method:: inverse_loc(lon, lat, alt) Inverse localization using c++ bindings :param lon: longitude position :type lon: float or 1D numpy.ndarray dtype=float64 :param lat: latitude position :type lat: float or 1D numpy.ndarray dtype=float64 :param alt: altitude :type alt: float :return: sensor position (row, col, alt) :rtype: tuple(1D np.array row position, 1D np.array col position, 1D np.array alt) .. py:method:: get_dtm_alt_offset(corners, dtm) returns min/max altitude offset between dtm coordinates system and RPC one :param corners: corners of the DTM's footprint :type corners: np.ndarray (4x2) :param dtm: DTM to get alt offset from :type dtm: bindings.DTMIntersection :return: min/max altimetric difference between RPC'sepsg minus dtm alti expressed in dtm epsg :rtype: list of float (1x2) .. py:method:: los_extrema(row, col, alt_min=None, alt_max=None, fill_nan=False, epsg=4326) compute los extrema :param row: line sensor position :type row: float :param col: column sensor position :type col: float :param alt_min: los alt min :type alt_min: float :param alt_max: los alt max :type alt_max: float :param epsg: epsg code of the dtm :type epsg: int :return: los extrema :rtype: numpy.array (2x3)