-
Notifications
You must be signed in to change notification settings - Fork 0
NC2KML summary
The NC2KML tool is a Java library, developed by SOCIB, to generate a KML file from a NetCDF file with trajectory data. The NetCDF file must be compliant with the following specification:
- Must be CF-1.6 compliant
- Must be single trajectory or single trajectory profile type.
- Should have the featureType global attribute with value trajectory or trajectoryProfile.
- Must have only one time coordinate of one dimension.
- Must have only one latitude coordinate with the same dimension as the time coordinate.
- Must have only one longitude coordinate with the same dimension as the time coordinate.
Also, additional info can be provided, like:
- The possibility of display ancillary variables, except quality controls variables.
- The initial deployment information (time, latitude and longitude values).
- The KML style information (KML title name, date format pattern, line style color, description template path and home, regular and end icon sytle).
- The opendap link to access the NetCDF data.
If the additional info isn't provided then is set with the following default values:
- The display ancillary variables indicator is set to “false”.Then the data of the anciallary varaibles won't be added to the KML file.
- The deployment information is set to “null”. Then the first position is from the NetCDF file.
- The kml tilte name is set to the “title” global attribute value if exists. Otherwise is set to “Trajectory data”.
- The date format pattern is set to “yyyy-MM-dd HH:mm:s”.
- The line style color is set to “bbbb0000”.
- The home icon is set to “http://www.socib.es/images/gl-gohome-128x128.png”.
- The regular icon is set to “http://www.socib.es/images/gl-forward-128x128.png”.
- The end icon is set to “http://www.socib.es/images/gl-down-128x128.png”.
The KML contains one placemark with the corresponding icon style for each position. The placemark has a balloon with the following information:
- The position date. The format pattern can be provided in the KML style information.
- The position in geographical coordinates degrees.
- The data values at the current position. The data can be of one dimension (time) or two dimensions (time and level). If has two dimensions, read the value from the current time and the level zero, array.get(i,0).
- The opendap link to access and download the data in NetCDF if exists. It provides all the information about the data and metadata.
Also, each placemark has definied a time period, that has the effect of restricting the visibility of the placemark. To represents the platform trajectory, a line string is created with the line style color defined in the KML style information.
When one data variable provides metadata about the individual values of another data variable it may be desirable to express this association by providing a link between the variables. For example, instrument data may have associated measures of uncertainty; data points may have associated quality control (qc) flags. The attribute “ancillary_variable” is used to express these types of relationships.
The NC2KML product define the quality control variable name as; the variable name with the QC_/qc_/quality_control_ prefix or the _QC/_qc/_quality_control suffix.
Some considerations:
- If the ancillary variables has more than one qc variable name, then the first qc variable name is used.
- If the variable doesn't have defined the ancillary variable attribute, the NC2KML tool search the qc variable from the variable.
- If the latitude and longitude have quality controls applied, only the good position (qc value <= 1) wiil be added to the kml. So, interpolated data (qc value == 8) won't be added.
- If the data value is bad data or NaN then his representation will be N/A (not available).