shareloc.geomodels.rpc_writers ============================== .. py:module:: shareloc.geomodels.rpc_writers .. autoapi-nested-parse:: This module contains the tools to write RPCs Attributes ---------- .. autoapisummary:: shareloc.geomodels.rpc_writers.AVALAIBLE_FORMATS Functions --------- .. autoapisummary:: shareloc.geomodels.rpc_writers.rpc_writer shareloc.geomodels.rpc_writers.geotiff_rpc_updater shareloc.geomodels.rpc_writers.write_rio_rpc_as_rpb shareloc.geomodels.rpc_writers.rpc_dict_to_rio_rpcs shareloc.geomodels.rpc_writers.write_rio_rpc_as_json Module Contents --------------- .. py:data:: AVALAIBLE_FORMATS :value: ['geotiff', 'geotiff_rpb', 'rpb', 'json'] .. py:function:: rpc_writer(rpc_params, filename, out_format = 'geotiff', override = False) writer from RPC dict, upper layer function to handle rpc_params for shareloc.rpc_reader.rpc_reader() :param rpc_params : rpc dict from rpc_reader :param filename : output file, in case of out_format is geotiff or geotiff_rpb, filename muse be in existing geotiff :param out_format : output_format in : geotiff, geotiff_rpb, rpb, json :param override : if True override rpc if already present in geotiff .. py:function:: geotiff_rpc_updater(rio_dict, filename, export_rpb=False, force_rpc=False) geotiff updater :param rio_dict: path to geomodel :param filename: output filename :param export_rpb: write an .RPB file :param force_rpc: if False an exception is raised if filename already contains RPC .. py:function:: write_rio_rpc_as_rpb(rpc, rpb_path, sat_id = 'UNKNOWN', band_id = 'P') Write .RPB file (Rational Polynomial Coefficients) :param rpc: Geotiff rpc dict :param rpc_path: output file (.RPB) :param sat_id: sat ID (ex: "QB02") :param band_id: band ID (ex: "P") .. py:function:: rpc_dict_to_rio_rpcs(rpc_params, topleftconvention=True) Load via rasterio RPC object :param rpc_params: shareloc rpc reader dict :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) :return rio rpc dict .. py:function:: write_rio_rpc_as_json(rio_rpc_dict, filename) Write rio rpc as json dict :param rio_rpc_dict: rio rpc dict RPC.to_dict() :param filename: json file