ceda_di.metadata package¶
Submodules¶
ceda_di.metadata.product module¶
Module for holding and exporting file metadata as JSON documents.
- class ceda_di.metadata.product.Parameter(name, other_params=None)¶
Bases: object
Placeholder/wrapper class for metadata parameters
Parameters: - name (str) – Name of variable/parameter
- other_params (dict) – Optional - Dict containing other param metadata
- get()¶
Return the list of parameter items
- static make_param_item(name, value)¶
Convert a name/value pair to dictionary (for better indexing in ES)
Parameters: - name (str) – Name of the parameter item (e.g. “long_name_fr”, etc)
- value (str) – Value of the parameter item (e.g. “Radiance”)
Returns: Dict containing name:value information
- class ceda_di.metadata.product.Properties(filesystem=None, spatial=None, temporal=None, data_format=None, parameters=None, **kwargs)¶
Bases: object
A class to hold, manipulate, and export geospatial metadata at file level.
- as_dict()¶
Return metadata as dict object.
Returns: Dictionary describing metadata
- as_json()¶
Return metadata as JSON string.
Returns: JSON document describing metadata.
- get_flight_info()¶
Return a dictionary populated with metadata about the flight that the given data file was captured on - flight number, organisation, etc.
Returns: A dict containing flight metadata.
- static valid_lat(num)¶
Return true if ‘num’ is a valid latitude.
Parameters: num (float) – Number to test Returns: True if ‘num’ is valid, else False
- static valid_lon(num)¶
Return true if ‘num’ is a valid longitude.
Parameters: num (float) – Number to test Returns: True if ‘num’ is valid, else False