-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minimise use of XML #8
Comments
We could change status_xml to status_str. I think 'status' is a bit too short and not descriptive enough. |
I am not a big fan of XML but I don't see a reason to exclude any format or choose a specific format. I would prefer to find a way to encode the information in netCDF native format as Mark noted. If we take _xml off I'm concerned that the user will not know what format to use to extract the information. Putting "XML" in the string may be difficult to then parse. I would suggest keeping the format of the sting values if the users need to use another parser (XML, JSON, YAML, ...) so the paring can be known right away. If there is no indication of the format it will be difficult to guess correctly. I don't know much about the data required in these variables and would need to spend some time digging in to it before making a suggestion. |
There are three places where we specify the use of XML packed into strings. These are
status_xml
,thresholding_xml
andlegend_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
:status
legend_xml
:legend_values
andlegend_labels
legend_values
is an integer arrayint[]
and stores the values for each entrylegend_labels
is a string arraystring[]
and stores the labels for each entrythresholding_xml
:threshold_field
,threshold_min
andthreshold_max
. Each would be an array which give the name of the field used to threshold this field along with the min/max limits.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).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)".The text was updated successfully, but these errors were encountered: