Skip to content

Commit

Permalink
Mecklenburg-Vorpommern and Baden-Württemberg DTM Provider
Browse files Browse the repository at this point in the history
* Mecklenburg-Vorpommern DTM Provider

* add extents

* Baden-Württemberg DTM provider
  • Loading branch information
kbrandwijk authored Jan 20, 2025
1 parent 2de919f commit 13b00cf
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 20 deletions.
42 changes: 22 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -656,29 +656,31 @@ 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/e02a4b5e-c5a9-4e6f-826f-048081704ef9)

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) |
| 🇩🇪 Baden-Württemberg, 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) |

## Special thanks

Expand Down
2 changes: 2 additions & 0 deletions maps4fs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
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.dtm.baden import BadenWurttembergProvider
from maps4fs.generator.game import Game
from maps4fs.generator.map import Map
from maps4fs.generator.settings import (
Expand Down
31 changes: 31 additions & 0 deletions maps4fs/generator/dtm/baden.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"""This module contains provider of Baden-Württemberg data."""

from maps4fs.generator.dtm.base.wcs import WCSProvider
from maps4fs.generator.dtm.dtm import DTMProvider


class BadenWurttembergProvider(WCSProvider, DTMProvider):
"""Provider of Baden-Württemberg data."""

_code = "baden"
_name = "Baden-Württemberg"
_region = "DE"
_icon = "🇩🇪"
_resolution = "1"
_author = "[kbrandwijk](https://github.com/kbrandwijk)"
_is_community = True
_instructions = None
_is_base = False
_extents = (49.79645444804715, 47.52877040346605, 10.54203149250156, 7.444081717803481)

_url = "https://owsproxy.lgl-bw.de/owsproxy/wcs/WCS_INSP_BW_Hoehe_Coverage_DGM1"
_wcs_version = "2.0.1"
_source_crs = "EPSG:25832"
_tile_size = 1000

def get_wcs_parameters(self, tile):
return {
"identifier": ["EL.ElevationGridCoverage"],
"subsets": [("E", str(tile[1]), str(tile[3])), ("N", str(tile[0]), str(tile[2]))],
"format": "image/tiff",
}
42 changes: 42 additions & 0 deletions maps4fs/generator/dtm/mv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
"""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 = (54.8, 53, 14.5, 10.5)

_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]))],
"format": "image/tiff",
}

0 comments on commit 13b00cf

Please sign in to comment.