Init dataset/layer config for seal tag data pulled from ADC#808
Init dataset/layer config for seal tag data pulled from ADC#808trey-stafford wants to merge 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
This lockfile provides a json representation of the config that's defined using Python. This allows us to quickly be able to assess the results of config changes against previous state.
There was a problem hiding this comment.
Here we define a new dataset for the layer we're adding. I manually pulled this information directly from the ADC dataset landing page.
For our QGreenland-Net processing, this information can be extracted programmatically from the metadata.
| dataset = Dataset( | ||
| id="seal_tag_measurements", | ||
| assets=[ | ||
| HttpAsset( |
There was a problem hiding this comment.
This dataset has just a single file (asset) we're interested in pulling (the ct71_0DV.csv). Note there are other files associated with the dataset on the ADC landing page, but we don't need those in QGreenland (e.g., a browse .png image).
There was a problem hiding this comment.
Beginning of the layer configuration. Each subdirectory under layers has a __settings__.py that defines layer and subgroup ordering. More info here.
There was a problem hiding this comment.
Here is the configuration for the layer itself. This includes the layer title (what it'll be called in the QGIS layers panel), description, style (not currently defined here, but normally we add a style file for each dataset to make it look nice by default), the dataset/asset used as input to create the layer, and the steps required to make it QGreenland-ready.
| asset=dataset.assets["only"], | ||
| ), | ||
| steps=[ | ||
| *ogr2ogr( |
There was a problem hiding this comment.
This helper function runs ogr2ogr under the hood and includes default options that we normally want for all of our vector layers (e.g., reproject to our project projection). You can find the implementation for this helper here: https://github.com/nsidc/qgreenland/blob/main/qgreenland/config/helpers/steps/ogr2ogr.py#L18-L46
Description
This PR adds a vector dataset giving the locations of seal tag measurements (water temp, salinity, depth, etc) from the ADC for demonstration purposes. This layer is relatively small and "easy" to transform into a QGreenland-ready dataset (csv w/ latitude and longitude columns -> Geopackage via
ogr2ogr) and may be a good test-case for QGreenland-Net work.Command to generate an (unzipped,
-Zoption) QGreenland package with the background layer and this new layer:Note that there might be one issue with the dataset that isn't so "easy" to deal with: there appear to be rows that have no "Cruise", "Station", "Type", or "Date" values. These rows follow in chunks after rows that do have those values. I'm wondering if the values are "constant" until the next row w/ updated values for those attrs. E.g.,:
If we end up wanting to actually include this data in QGreenland, we'll want to investigate more and fix if needed.
Checklist
If an item on this list is done or not needed, check it with
[x]or click thecheckbox.
closes #{issue_number}inv config.export > qgreenland/config/cfg-lock.json)conda-lock)bumpversion (major|minor|patch|prerelease|build))