There are three places where we specify the use of XML packed into strings. These are status_xml, thresholding_xml and legend_xml. Having XML packed into strings introduces an extra language that must be parsed by users and makes the format more complex that needed.
It would be nice to remove XML entirely and just rely on the built in metadata functionality already provided by NetCDF. Here's my thoughts:
status_xml:
- Rename this variable to
status
- Remove the reference to XML from the description
- The contents of this field is free for the user to specify, so why limit them to XML? This allows them to store BiTE messages, or JSON, YAML, or whatever is appropriate for their system.
legend_xml:
- Replace with two attributes
legend_values and legend_labels
- The
legend_values is an integer array int[] and stores the values for each entry
- The
legend_labels is a string array string[] and stores the labels for each entry
thresholding_xml:
- One idea would be to use a similar approach to the suggestion above but with
threshold_field, threshold_min and threshold_max. Each would be an array which give the name of the field used to threshold this field along with the min/max limits.
- Unfortunately this doesn't cater for complex conditions like the one mentioned in the
note field of the XML example ("NCP only checked if DBZ > 40"). On the other hand, since this note is stored as a comment it's also not well represented in the XML (and is using an illegal '>' character).
- Another idea would be to specify the
thresholding attribute as a simple string. The example would encourage using basic mathematical syntax to combine values from the fields. So the value from the example would be "SNR > -3.0 and (DBZ < 40 or NCP > 0.15)".
There are three places where we specify the use of XML packed into strings. These are
status_xml,thresholding_xmlandlegend_xml. Having XML packed into strings introduces an extra language that must be parsed by users and makes the format more complex that needed.It would be nice to remove XML entirely and just rely on the built in metadata functionality already provided by NetCDF. Here's my thoughts:
status_xml:statuslegend_xml:legend_valuesandlegend_labelslegend_valuesis an integer arrayint[]and stores the values for each entrylegend_labelsis a string arraystring[]and stores the labels for each entrythresholding_xml:threshold_field,threshold_minandthreshold_max. Each would be an array which give the name of the field used to threshold this field along with the min/max limits.notefield of the XML example ("NCP only checked if DBZ > 40"). On the other hand, since this note is stored as a comment it's also not well represented in the XML (and is using an illegal '>' character).thresholdingattribute as a simple string. The example would encourage using basic mathematical syntax to combine values from the fields. So the value from the example would be "SNR > -3.0 and (DBZ < 40 or NCP > 0.15)".