aws.osml.gdal.xmltre_utils module

aws.osml.gdal.xmltre_utils.get_tre_field_value(tre: Element, field_name: str, type_conversion: Callable[[str], T]) T[source]

This is a private utility function that will find a named “field” element in the children of a TRE Element and return the “value” attribute of that named field. A type conversion function can be provided to convert the attribute value to a specific Python type (e.g. int, float, or str)

Parameters:
  • tre – the root element to find the named field in

  • field_name – the name of the field element

  • type_conversion – the desired type of the output, must support construction from a string

Returns:

T = the value converted to the requested type

aws.osml.gdal.xmltre_utils.parse_rpc_coefficients(tre: Element, repeated_name: str) List[float][source]

This private utility function parses RPC coefficients from the child elements of a <repeated …> tag in the XML TREs.

Parameters:
  • tre – XML document

  • repeated_name – find a specific name in the XML tree

Returns:

a list of floating point values for the coefficients