From 19f78d272bd655b6b75921d70ec20e99d5af3a3a Mon Sep 17 00:00:00 2001 From: Kim Brandwijk Date: Mon, 20 Jan 2025 16:50:08 -0500 Subject: [PATCH] Mecklenburg-Vorpommern DTM Provider --- README.md | 41 +++++++++++++++++----------------- maps4fs/__init__.py | 1 + maps4fs/generator/dtm/mv.py | 44 +++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 20 deletions(-) create mode 100644 maps4fs/generator/dtm/mv.py diff --git a/README.md b/README.md index da3e1c61..8e6cb430 100644 --- a/README.md +++ b/README.md @@ -656,29 +656,30 @@ The generator supports adding the own DTM providers, please refer to the [DTM Pr ### Supported DTM providers -![coverage map](https://github.com/user-attachments/assets/138fa637-ce63-4dd9-bd11-bf92fe038a74) +![coverage map](https://github.com/user-attachments/assets/f6082c08-f2eb-43ef-bf97-e8b371bce7a7) In addition to SRTM 30m, which provides global coverage, the map above highlights all countries and/or regions where higher resolution coverage is provided by one of the DTM providers. -| Provider Name | Resolution | Developer | -| ------------------------------- | ------------ | ------------------------------------------- | -| 🌎 SRTM30 | 30 meters | [iwatkot](https://github.com/iwatkot) | -| 🇺🇸 USGS | 1-90 meters | [ZenJakey](https://github.com/ZenJakey) | -| 🏴󠁧󠁢󠁥󠁮󠁧󠁿 England | 1 meter | [kbrandwijk](https://github.com/kbrandwijk) | -| 🏴󠁧󠁢󠁳󠁣󠁴󠁿 Scotland | 0.25-1 meter | [kbrandwijk](https://github.com/kbrandwijk) | -| 🇩🇪 Hessen, Germany | 1 meter | [kbrandwijk](https://github.com/kbrandwijk) | -| 🇩🇪 Niedersachsen, Germany | 1 meter | [kbrandwijk](https://github.com/kbrandwijk) | -| 🇩🇪 Bayern, Germany | 1 meter | [H4rdB4se](https://github.com/H4rdB4se) | -| 🇩🇪 Nordrhein-Westfalen, Germany | 1 meter | [kbrandwijk](https://github.com/kbrandwijk) | -| 🇨🇦 Canada | 1 meter | [kbrandwijk](https://github.com/kbrandwijk) | -| 🇧🇪 Flanders, Belgium | 1 meter | [kbrandwijk](https://github.com/kbrandwijk) | -| 🇫🇷 France | 1 meter | [kbrandwijk](https://github.com/kbrandwijk) | -| 🇮🇹 Italy | 10 meter | [kbrandwijk](https://github.com/kbrandwijk) | -| 🇳🇴 Norway | 1 meter | [kbrandwijk](https://github.com/kbrandwijk) | -| 🇪🇸 Spain | 5 meter | [kbrandwijk](https://github.com/kbrandwijk) | -| 🇫🇮 Finland | 2 meter | [kbrandwijk](https://github.com/kbrandwijk) | -| 🇩🇰 Denmark | 0.4 meter | [kbrandwijk](https://github.com/kbrandwijk) | -| 🇨🇭 Switzerland | 0.5-2 meter | [kbrandwijk](https://github.com/kbrandwijk) | +| Provider Name | Resolution | Developer | +| ---------------------------------- | ------------ | ------------------------------------------- | +| 🌎 SRTM30 | 30 meters | [iwatkot](https://github.com/iwatkot) | +| 🇺🇸 USGS | 1-90 meters | [ZenJakey](https://github.com/ZenJakey) | +| 🏴󠁧󠁢󠁥󠁮󠁧󠁿 England | 1 meter | [kbrandwijk](https://github.com/kbrandwijk) | +| 🏴󠁧󠁢󠁳󠁣󠁴󠁿 Scotland | 0.25-1 meter | [kbrandwijk](https://github.com/kbrandwijk) | +| 🇩🇪 Hessen, Germany | 1 meter | [kbrandwijk](https://github.com/kbrandwijk) | +| 🇩🇪 Niedersachsen, Germany | 1 meter | [kbrandwijk](https://github.com/kbrandwijk) | +| 🇩🇪 Bayern, Germany | 1 meter | [H4rdB4se](https://github.com/H4rdB4se) | +| 🇩🇪 Nordrhein-Westfalen, Germany | 1 meter | [kbrandwijk](https://github.com/kbrandwijk) | +| 🇩🇪 Mecklenburg-Vorpommern, Germany | 1-25 meter | [kbrandwijk](https://github.com/kbrandwijk) | +| 🇨🇦 Canada | 1 meter | [kbrandwijk](https://github.com/kbrandwijk) | +| 🇧🇪 Flanders, Belgium | 1 meter | [kbrandwijk](https://github.com/kbrandwijk) | +| 🇫🇷 France | 1 meter | [kbrandwijk](https://github.com/kbrandwijk) | +| 🇮🇹 Italy | 10 meter | [kbrandwijk](https://github.com/kbrandwijk) | +| 🇳🇴 Norway | 1 meter | [kbrandwijk](https://github.com/kbrandwijk) | +| 🇪🇸 Spain | 5 meter | [kbrandwijk](https://github.com/kbrandwijk) | +| 🇫🇮 Finland | 2 meter | [kbrandwijk](https://github.com/kbrandwijk) | +| 🇩🇰 Denmark | 0.4 meter | [kbrandwijk](https://github.com/kbrandwijk) | +| 🇨🇭 Switzerland | 0.5-2 meter | [kbrandwijk](https://github.com/kbrandwijk) | ## Special thanks diff --git a/maps4fs/__init__.py b/maps4fs/__init__.py index b69182d7..27f8eec0 100644 --- a/maps4fs/__init__.py +++ b/maps4fs/__init__.py @@ -17,6 +17,7 @@ from maps4fs.generator.dtm.norway import NorwayProvider from maps4fs.generator.dtm.denmark import DenmarkProvider from maps4fs.generator.dtm.switzerland import SwitzerlandProvider +from maps4fs.generator.dtm.mv import MecklenburgVorpommernProvider from maps4fs.generator.game import Game from maps4fs.generator.map import Map from maps4fs.generator.settings import ( diff --git a/maps4fs/generator/dtm/mv.py b/maps4fs/generator/dtm/mv.py new file mode 100644 index 00000000..ff0e8fec --- /dev/null +++ b/maps4fs/generator/dtm/mv.py @@ -0,0 +1,44 @@ +"""This module contains provider of Mecklenburg-Vorpommern data.""" + +from maps4fs.generator.dtm.base.wcs import WCSProvider +from maps4fs.generator.dtm.dtm import DTMProvider, DTMProviderSettings + + +class MecklenburgVorpommernProviderSettings(DTMProviderSettings): + """Settings for the Mecklenburg-Vorpommern provider.""" + + dataset: dict | str = { + "mv_dgm": "Mecklenburg-Vorpommern DGM1", + "mv_dgm5": "Mecklenburg-Vorpommern DGM5", + "mv_dgm25": "Mecklenburg-Vorpommern DGM25", + } + + +class MecklenburgVorpommernProvider(WCSProvider, DTMProvider): + """Provider of Mecklenburg-Vorpommern data.""" + + _code = "mv" + _name = "Mecklenburg-Vorpommern" + _region = "DE" + _icon = "🇩🇪" + _resolution = "1-25" + _author = "[kbrandwijk](https://github.com/kbrandwijk)" + _is_community = True + _instructions = None + _is_base = False + _settings = MecklenburgVorpommernProviderSettings + # _extents = (72.1016879476356962, 57.2738836442695103, 33.3365910058243742, -2.0075617181675725) + + _url = "https://www.geodaten-mv.de/dienste/dgm_wcs" + _wcs_version = "2.0.1" + _source_crs = "EPSG:25833" + _tile_size = 1000 + + def get_wcs_parameters(self, tile): + return { + "identifier": [self.user_settings.dataset], + "subsets": [("x", str(tile[1]), str(tile[3])), ("y", str(tile[0]), str(tile[2]))], + # "width": 1000, + # "height": 1000, + "format": "image/tiff", + }