Skip to content

Commit

Permalink
Init config for cities & settlements layers from Asiaq/NunaGIS
Browse files Browse the repository at this point in the history
Lot of overlap between our existing place names database from Asiaq and these
layers. Of course, these layers do not have english translations/explanations.

We need to decide if we want to keep the original place names database
around ("Towns and settlements" is derived from it). It includes way more than
just towns/settlements. It has place names for various outher landmarks (e.g.,
islands, lakes, etc). Maybe we keep that layer and the cities & towns from
NunaGIS separately? Or just get rid of the Asiaq place names database layers
altogether?
  • Loading branch information
trey-stafford committed Jun 21, 2023
1 parent 7be3057 commit cbc03b5
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
10 changes: 10 additions & 0 deletions qgreenland/config/datasets/asiaq_nunagis.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@
output_file="{output_dir}/fetched.geojson",
url="https://kort.nunagis.gl/refserver/rest/services/Kortportal/Kortportal_TekniskGrundkort/MapServer/38/query/?f=json&where=OBJECTID+is+not+null&outFields=*&orderByFields=OBJECTID+ASC",
),
ogr_remote_asset(
asset_id="settlements",
output_file="{output_dir}/fetched.geojson",
url="https://kort.nunagis.gl/refserver/rest/services/Kortportal/Byer_og_bygder/MapServer/0/query/?f=json&where=OBJECTID+is+not+null&outFields=*&orderByFields=OBJECTID+ASC",
),
ogr_remote_asset(
asset_id="cities",
output_file="{output_dir}/fetched.geojson",
url="https://kort.nunagis.gl/refserver/rest/services/Kortportal/Byer_og_bygder/MapServer/1/query/?f=json&where=OBJECTID+is+not+null&outFields=*&orderByFields=OBJECTID+ASC",
),
],
metadata={
"title": "Asiaq Map Portal Techincal Basemap",
Expand Down
2 changes: 2 additions & 0 deletions qgreenland/config/layers/Places/__settings__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
":comprehensive_places",
":buildings",
":roads",
":cities",
":settlements",
],
)
42 changes: 42 additions & 0 deletions qgreenland/config/layers/Places/places.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
from qgreenland.config.datasets.asiaq_nunagis import asiaq_nunagis
from qgreenland.config.helpers.steps.ogr2ogr import ogr2ogr
from qgreenland.config.project import project
from qgreenland.models.config.layer import Layer, LayerInput

cities = Layer(
id="cities",
title="Cities",
# style=None,
description="""Lines representing roads in Greenland.""",
tags=["places"],
input=LayerInput(
dataset=asiaq_nunagis,
asset=asiaq_nunagis.assets["cities"],
),
steps=[
*ogr2ogr(
input_file="{input_dir}/fetched.geojson",
output_file="{output_dir}/final.gpkg",
boundary_filepath=project.boundaries["data"].filepath,
),
],
)

settlements = Layer(
id="settlements",
title="Settlements",
# style=None,
description="""Lines representing roads in Greenland.""",
tags=["places"],
input=LayerInput(
dataset=asiaq_nunagis,
asset=asiaq_nunagis.assets["settlements"],
),
steps=[
*ogr2ogr(
input_file="{input_dir}/fetched.geojson",
output_file="{output_dir}/final.gpkg",
boundary_filepath=project.boundaries["data"].filepath,
),
],
)

0 comments on commit cbc03b5

Please sign in to comment.