shareloc.geomodels.rpc_readers ============================== .. py:module:: shareloc.geomodels.rpc_readers .. autoapi-nested-parse:: This module contains the RPC formats handling to instantiate RPC models. RPC models covered are : DIMAP V1, DIMAP V2, DIMAP V3, ossim (geom file), geotiff. Functions --------- .. autoapisummary:: shareloc.geomodels.rpc_readers.rpc_reader shareloc.geomodels.rpc_readers.rpc_reader_dimap_v23 shareloc.geomodels.rpc_readers.rpc_reader_dimap_v1 shareloc.geomodels.rpc_readers.rpc_reader_ossim_kwl shareloc.geomodels.rpc_readers.identify_dimap shareloc.geomodels.rpc_readers.parse_coeff_line shareloc.geomodels.rpc_readers.identify_ossim_kwl shareloc.geomodels.rpc_readers.rpc_reader_via_rasterio Module Contents --------------- .. py:function:: rpc_reader(geomodel_path, topleftconvention = True) 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) :param geomodel_path geomodel filename :return rpc dict filled with parameters .. py:function:: rpc_reader_dimap_v23(geomodel_path, topleftconvention = True) Load from Dimap v2 and V3 :param geomodel_path: path to geomodel :param topleftconvention: [0,0] position :type topleftconvention: boolean 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) :returns rpc_dict .. py:function:: rpc_reader_dimap_v1(geomodel_path, topleftconvention = True) Load from dimap v1 ** Deprecated, to clean ? ** :param geomodel_path: path to geomodel :param topleftconvention: [0,0] position :type topleftconvention: boolean 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:function:: rpc_reader_ossim_kwl(geomodel_path, topleftconvention = True) Load from a geom file :param geomodel_path: path to geomodel :param topleftconvention: [0,0] position :type topleftconvention: boolean 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:function:: identify_dimap(xml_file) parse xml file to identify dimap and its version :param xml_file: dimap rpc file :type xml_file: str :return: dimap info : dimap_version and None if not an dimap file :rtype: str .. py:function:: parse_coeff_line(coeff_str) split str coef to float list :param coeff_str: line coef :type coeff_str: str :return: coeff list :rtype: list() .. py:function:: identify_ossim_kwl(ossim_kwl_file) parse geom file to identify if it is an ossim model :param ossim_kwl_fil : ossim keyword list file :type ossim_kwl_file: str :return: ossimmodel or None if not an ossim kwl file :rtype: str .. py:function:: rpc_reader_via_rasterio(geomodel_path, topleftconvention=True) Load via rasterio RPC object :param geomodel_path: path to geomodel :param topleftconvention: [0,0] position :type topleftconvention: boolean 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)