-
Notifications
You must be signed in to change notification settings - Fork 9
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
Init dataset/layer config for seal tag data pulled from ADC #808
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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,
-Z
option) 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)
)