NCAR / CfRadial

NetCDF CF Conventions for radial coordinate data for RADAR and LIDAR
BSD 2-Clause "Simplified" License
22 stars 7 forks source link

Minimise use of XML #8

Open marack opened 5 years ago

marack commented 5 years ago

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:

legend_xml:

thresholding_xml:

mike-dixon commented 5 years ago

We could change status_xml to status_str. I think 'status' is a bit too short and not descriptive enough. I prefer status_xml, but its not a big deal for me, so making it more flexible is fine with me. For legends, having values and labels is OK, but Ken may have some ideas about how to do this with CF conventions in mind. The advantage of XML for thresholding is that it allows for complex structures. But once again, we could specify a string instead of XML. This is new for CfRadial2.

kenkehoe commented 5 years ago

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.