mt_metadata.transfer_functions.io.emtfxml.metadata.location

Classes

Location

A partial location class that only includes the latitude, longitude, and elevation.

Module Contents

class mt_metadata.transfer_functions.io.emtfxml.metadata.location.Location(**data)

Bases: mt_metadata.common.BasicLocation

A partial location class that only includes the latitude, longitude, and elevation. This is used to avoid circular imports.

declination: Annotated[mt_metadata.common.Declination, Field(default_factory=Declination, description='Declination at the location in degrees', alias=None, json_schema_extra={'units': 'degrees', 'required': False, 'examples': ['10.0']})]
to_xml(string=False, required=True)

Overwrite to XML to follow EMTF XML format

Parameters:
  • string (bool) – If True, return the XML as a string. If False, return an ElementTree Element. Defaults to False.

  • required (bool) – If True, include all required fields in the XML. Defaults to True.

Return type:

XML representation of the BasicLocationDeclination object as a string or ElementTree Element.