aws.osml.gdal.rpc_sensor_model_builder module

class aws.osml.gdal.rpc_sensor_model_builder.RPCSensorModelBuilder(xml_tres: Element)[source]

Bases: SensorModelBuilder

This builder is used to create sensor models for images that have RPC TREs. The inputs are not the TREs themselves but rather the XML formatted TREs resulting from GDAL’s parsing of that information. This information can be obtained by accessing the xml:TRE metadata domain for a given GDAL dataset.

This builder only supports the RPC00B format of this metadata information. Support for other TREs can be added in the future if we find ourselves working with imagery containing that metadata.

See STDI-0002 Volume 1 Appendix E for more detailed information.

build() RPCSensorModel | None[source]

Examine the TRE metadata for RPC information, parse the necessary values out of those TREs, and construct a RPC sensor model.

Returns:

a RPC SensorModel if one can be constructed, None otherwise

static build_rpc_sensor_model(rpc_tre: Element) RPCSensorModel[source]

This private method constructs an RPC sensor model from an RPC00B TRE.

Parameters:

rpc_tre – the GDAL XML for RPC00B

Returns:

the RPC sensor model

static build_rpc_polynomial(rpc_tre: Element, polynomial_name: str) RPCPolynomial[source]

This private method constructs a RPC polynomial from coefficients found inthe RPC00B TRE. There are 4 repeating groups of these coefficients for the polynomials associated with line or sample numerators and denominators.

Parameters:
  • rpc_tre – the GDAL XML for RPC00B

  • polynomial_name – the name of the polynomial to build

Returns:

the RPC polynomial