Skip to content
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

Online access arctic dem #799

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v3.1.0 (2023-08-31)

- Add new "Terrain models/Internet required/Arctic DEM" layer.

# v3.0.0 (2023-08-24)

- Switch to `.qgz` compressed project file.
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ keywords:
url: "https://github.com/nsidc/qgreenland"
repository-code: "https://github.com/nsidc/qgreenland"

version: "3.0.0"
date-released: "2023-08-24"
version: "3.1.0"
date-released: "2023-08-31"

authors:
- family-names: "*Fisher"
Expand Down
2 changes: 1 addition & 1 deletion VERSION.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export QGREENLAND_VERSION="v3.0.0"
export QGREENLAND_VERSION="v3.1.0"
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
author = "National Snow and Ice Data Center"

# The full version, including alpha/beta/rc tags
release = "v3.0.0"
release = "v3.1.0"


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ inline-quotes = "double"


[tool.bumpversion]
current_version = "3.0.0"
current_version = "3.1.0"
commit = false
tag = false
parse = """
Expand Down
2 changes: 1 addition & 1 deletion qgreenland/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "v3.0.0"
__version__ = "v3.1.0"
2 changes: 1 addition & 1 deletion qgreenland/_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import Literal, Union

VectorOrRaster = Literal["Vector", "Raster"]
QgsLayerProviderType = Literal["gdal", "ogr", "wms", "wfs", "wcs"]
QgsLayerProviderType = Literal["gdal", "ogr", "wms", "wfs", "wcs", "arcgismapserver"]

ResamplingMethod = Literal["bilinear", "nearest"]

Expand Down
158 changes: 37 additions & 121 deletions qgreenland/config/cfg-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,22 @@
"title": "Arctic Circle (66\u00b0 34' North)"
}
},
"arctic_dem": {
"arctic_dem_online_v4_1": {
"assets": {
"100m": {
"id": "100m",
"urls": [
"https://data.pgc.umn.edu/elev/dem/setsm/ArcticDEM/mosaic/v3.0/100m/arcticdem_mosaic_100m_v3.0.tif"
],
"verify_tls": false
},
"1km": {
"id": "1km",
"urls": [
"http://data.pgc.umn.edu/elev/dem/setsm/ArcticDEM/mosaic/v3.0/1km/arcticdem_mosaic_1km_v3.0.tif"
],
"verify_tls": true
},
"500m": {
"id": "500m",
"urls": [
"http://data.pgc.umn.edu/elev/dem/setsm/ArcticDEM/mosaic/v3.0/500m/arcticdem_mosaic_500m_v3.0.tif"
],
"verify_tls": true
"only": {
"id": "only",
"provider": "arcgismapserver",
"url": "crs='EPSG:3413' crs='EPSG:3413' format='' layer='' url='https://overlord.pgc.umn.edu/arcgis/rest/services/elevation/pgc_arcticdem_mosaics_latest/ImageServer'"
}
},
"id": "arctic_dem",
"id": "arctic_dem_online_v4_1",
"metadata": {
"abstract": "ArcticDEM is an NGA-NSF public-private initiative to\nautomatically produce a high-resolution, high quality, digital\nsurface model (DSM) of the Arctic using optical stereo imagery,\nhigh-performance computing, and open source photogrammetry\nsoftware.",
"citation": {
"text": "Data provided by the Polar Geospatial Center. Porter, Claire;\nMorin, Paul; Howat, Ian; Noh, Myoung-Jon; Bates, Brian;\nPeterman, Kenneth; Keesey, Scott; Schlenk, Matthew; Gardiner,\nJudith; Tomko, Karen; Willis, Michael; Kelleher, Cole; Cloutier,\nMichael; Husby, Eric; Foga, Steven; Nakamura, Hitomi; Platson,\nMelisa; Wethington, Michael, Jr.; Williamson, Cathleen; Bauer,\nGregory; Enos, Jeremy; Arnold, Galen; Kramer, William; Becker,\nPeter; Doshi, Abhijit; D\u2019Souza, Cristelle; Cummens, Pat;\nLaurier, Fabien; Bojesen, Mikkel, 2018, \u201cArcticDEM\u201d,\nhttps://doi.org/10.7910/DVN/OHHUKH, Harvard Dataverse, V1,\n2020-01-23",
"text": "Porter, C., Howat, I., Noh, M.J., Husby, E., Khuvis, S.,\nDanish, E., Tomko, K., Gardiner, J., Negrete, A., Yadav, B., Klassen, J.,\nKelleher, C., Cloutier, M., Bakker, J., Enos, J., Arnold, G., Bauer, G., and\nMorin, P., 2023, \"ArcticDEM - Mosaics, Version 4.1\",\nhttps://doi.org/10.7910/DVN/3VDC4W",
"url": "https://www.pgc.umn.edu/data/arcticdem/"
},
"title": "Arctic DEM (1km mosaic)"
"title": "Arctic DEM"
}
},
"arctic_vegetation_biomass_2010": {
Expand Down Expand Up @@ -27191,111 +27175,43 @@
}
},
{
"layer_cfg": {
"description": "Surface elevation in meters using hillshade symbology.",
"id": "arctic_dem",
"in_package": false,
"input": {
"asset": {
"id": "100m"
},
"dataset": {
"id": "arctic_dem"
}
},
"show": false,
"steps": [
{
"args": [
"gdalwarp",
"-cutline",
"{assets_dir}/greenland_rectangle.geojson",
"-crop_to_cutline",
"-r",
"bilinear",
"-t_srs",
"EPSG:3413",
"-co",
"COMPRESS=DEFLATE",
"{input_dir}/arcticdem_mosaic_100m_v3.0.tif",
"{output_dir}/arctic_dem.tif"
],
"type": "command"
},
{
"args": [
"gdal_calc.py",
"--calc",
"\"A * 100.0\"",
"--NoDataValue",
"-9999",
"--type",
"Int32",
"-A",
"{input_dir}/arctic_dem.tif",
"--outfile",
"{output_dir}/arctic_dem_scaled.tif"
],
"type": "command"
},
{
"args": [
"cp",
"{input_dir}/arctic_dem_scaled.tif",
"{output_dir}/arctic_dem.tif",
"&&",
"gdal_edit.py",
"-scale",
"0.01",
"{output_dir}/arctic_dem.tif"
],
"type": "command"
},
{
"args": [
"gdal_translate",
"-co",
"TILED=YES",
"-co",
"COMPRESS=DEFLATE",
"-co",
"PREDICTOR=2",
"{input_dir}/arctic_dem.tif",
"{output_dir}/compressed.tif"
],
"type": "command"
"children": [
{
"layer_cfg": {
"description": "Surface elevation in meters.",
"id": "arctic_dem",
"in_package": true,
"input": {
"asset": {
"id": "only"
},
"dataset": {
"id": "arctic_dem_online_v4_1"
}
},
"show": false,
"steps": null,
"style": null,
"tags": [],
"title": "Arctic DEM"
},
{
"args": [
"cp",
"{input_dir}/compressed.tif",
"{output_dir}/arctic_dem.tif",
"&&",
"gdaladdo",
"-r",
"average",
"{output_dir}/arctic_dem.tif",
"2",
"4",
"8",
"16"
],
"type": "command"
}
],
"style": "arctic_dem",
"tags": [],
"title": "Arctic DEM (100m)"
},
"name": "arctic_dem"
"name": "arctic_dem"
}
],
"name": "Internet required",
"settings": {
"expand": false,
"order": null,
"show": false
}
}
],
"name": "Terrain models",
"settings": {
"expand": false,
"order": [
"BedMachine v5",
":arctic_dem"
"Internet required"
],
"show": false
}
Expand Down
51 changes: 17 additions & 34 deletions qgreenland/config/datasets/arctic_dem.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,21 @@
from qgreenland.models.config.asset import HttpAsset
from qgreenland.models.config.asset import OnlineAsset
from qgreenland.models.config.dataset import Dataset

arctic_dem = Dataset(
id="arctic_dem",
arctic_dem_online_v4_1 = Dataset(
id="arctic_dem_online_v4_1",
assets=[
HttpAsset(
id="1km",
urls=[
"http://data.pgc.umn.edu/elev/dem/setsm/ArcticDEM/mosaic/v3.0/1km/arcticdem_mosaic_1km_v3.0.tif",
],
),
HttpAsset(
id="500m",
urls=[
"http://data.pgc.umn.edu/elev/dem/setsm/ArcticDEM/mosaic/v3.0/500m/arcticdem_mosaic_500m_v3.0.tif",
],
),
HttpAsset(
id="100m",
# This shouldn't be necessary?
verify_tls=False,
urls=[
"https://data.pgc.umn.edu/elev/dem/setsm/ArcticDEM/mosaic/v3.0/100m/arcticdem_mosaic_100m_v3.0.tif",
],
OnlineAsset(
id="only",
provider="arcgismapserver",
url=(
"crs='EPSG:3413' crs='EPSG:3413' format='' layer='' "
"url='https://overlord.pgc.umn.edu/arcgis/rest/services/elevation/"
"pgc_arcticdem_mosaics_latest/ImageServer'"
),
),
],
metadata={
"title": "Arctic DEM (1km mosaic)",
"title": "Arctic DEM",
"abstract": (
"""ArcticDEM is an NGA-NSF public-private initiative to
automatically produce a high-resolution, high quality, digital
Expand All @@ -36,17 +25,11 @@
),
"citation": {
"text": (
"""Data provided by the Polar Geospatial Center. Porter, Claire;
Morin, Paul; Howat, Ian; Noh, Myoung-Jon; Bates, Brian;
Peterman, Kenneth; Keesey, Scott; Schlenk, Matthew; Gardiner,
Judith; Tomko, Karen; Willis, Michael; Kelleher, Cole; Cloutier,
Michael; Husby, Eric; Foga, Steven; Nakamura, Hitomi; Platson,
Melisa; Wethington, Michael, Jr.; Williamson, Cathleen; Bauer,
Gregory; Enos, Jeremy; Arnold, Galen; Kramer, William; Becker,
Peter; Doshi, Abhijit; D’Souza, Cristelle; Cummens, Pat;
Laurier, Fabien; Bojesen, Mikkel, 2018, “ArcticDEM”,
https://doi.org/10.7910/DVN/OHHUKH, Harvard Dataverse, V1,
2020-01-23"""
"""Porter, C., Howat, I., Noh, M.J., Husby, E., Khuvis, S.,
Danish, E., Tomko, K., Gardiner, J., Negrete, A., Yadav, B., Klassen, J.,
Kelleher, C., Cloutier, M., Bakker, J., Enos, J., Arnold, G., Bauer, G., and
Morin, P., 2023, "ArcticDEM - Mosaics, Version 4.1",
https://doi.org/10.7910/DVN/3VDC4W"""
),
"url": "https://www.pgc.umn.edu/data/arcticdem/",
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from qgreenland.config.datasets.arctic_dem import arctic_dem_online_v4_1 as dataset
from qgreenland.models.config.layer import Layer, LayerInput

arctic_dem_online = Layer(
id="arctic_dem",
title="Arctic DEM",
description=(
"""Surface elevation in meters.

Note that the Polar Geospatial Center also provides custom download options for
a 32m ArcticDEM for QGreenland users. Learn about these add-on data for
QGreenland here:
https://qgreenland.readthedocs.io/en/latest/user/reference/addons/arctic-dem-addon-data.html
"""
),
in_package=True,
tags=[],
input=LayerInput(
dataset=dataset,
asset=dataset.assets["only"],
),
)
3 changes: 1 addition & 2 deletions qgreenland/config/layers/Terrain models/__settings__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from qgreenland.models.config.layer_group import (
LayerGroupIdentifier,
LayerGroupSettings,
LayerIdentifier,
)

settings = LayerGroupSettings(
order=[
LayerGroupIdentifier("BedMachine v5"),
LayerIdentifier("arctic_dem"),
LayerGroupIdentifier("Internet required"),
],
)
Loading
Loading