maps4fs 1.8.199__tar.gz → 1.8.201__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. {maps4fs-1.8.199 → maps4fs-1.8.201}/PKG-INFO +3 -1
  2. {maps4fs-1.8.199 → maps4fs-1.8.201}/README.md +2 -0
  3. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/__init__.py +1 -0
  4. maps4fs-1.8.201/maps4fs/generator/dtm/lithuania.py +64 -0
  5. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs.egg-info/PKG-INFO +3 -1
  6. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs.egg-info/SOURCES.txt +1 -0
  7. {maps4fs-1.8.199 → maps4fs-1.8.201}/pyproject.toml +1 -1
  8. {maps4fs-1.8.199 → maps4fs-1.8.201}/LICENSE.md +0 -0
  9. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/__init__.py +0 -0
  10. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/__init__.py +0 -0
  11. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/component/__init__.py +0 -0
  12. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/component/background.py +0 -0
  13. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/component/base/__init__.py +0 -0
  14. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/component/base/component.py +0 -0
  15. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/component/base/component_image.py +0 -0
  16. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/component/base/component_mesh.py +0 -0
  17. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/component/base/component_xml.py +0 -0
  18. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/component/config.py +0 -0
  19. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/component/grle.py +0 -0
  20. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/component/i3d.py +0 -0
  21. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/component/layer.py +0 -0
  22. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/component/satellite.py +0 -0
  23. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/component/texture.py +0 -0
  24. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dem.py +0 -0
  25. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/arctic.py +0 -0
  26. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/baden.py +0 -0
  27. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/base/wcs.py +0 -0
  28. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/base/wms.py +0 -0
  29. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/bavaria.py +0 -0
  30. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/canada.py +0 -0
  31. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/czech.py +0 -0
  32. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/denmark.py +0 -0
  33. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/dtm.py +0 -0
  34. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/england.py +0 -0
  35. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/finland.py +0 -0
  36. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/flanders.py +0 -0
  37. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/france.py +0 -0
  38. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/hessen.py +0 -0
  39. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/italy.py +0 -0
  40. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/mv.py +0 -0
  41. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/niedersachsen.py +0 -0
  42. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/norway.py +0 -0
  43. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/nrw.py +0 -0
  44. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/rema.py +0 -0
  45. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/sachsenanhalt.py +0 -0
  46. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/scotland.py +0 -0
  47. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/spain.py +0 -0
  48. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/srtm.py +0 -0
  49. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/switzerland.py +0 -0
  50. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/usgs_wcs.py +0 -0
  51. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/dtm/utils.py +0 -0
  52. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/game.py +0 -0
  53. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/map.py +0 -0
  54. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/qgis.py +0 -0
  55. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/generator/settings.py +0 -0
  56. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/logger.py +0 -0
  57. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/toolbox/__init__.py +0 -0
  58. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/toolbox/background.py +0 -0
  59. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/toolbox/custom_osm.py +0 -0
  60. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs/toolbox/dem.py +0 -0
  61. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs.egg-info/dependency_links.txt +0 -0
  62. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs.egg-info/requires.txt +0 -0
  63. {maps4fs-1.8.199 → maps4fs-1.8.201}/maps4fs.egg-info/top_level.txt +0 -0
  64. {maps4fs-1.8.199 → maps4fs-1.8.201}/setup.cfg +0 -0
  65. {maps4fs-1.8.199 → maps4fs-1.8.201}/tests/test_generator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: maps4fs
3
- Version: 1.8.199
3
+ Version: 1.8.201
4
4
  Summary: Generate map templates for Farming Simulator from real places.
5
5
  Author-email: iwatkot <iwatkot@gmail.com>
6
6
  License: MIT License
@@ -714,6 +714,8 @@ In addition to SRTM 30m, which provides global coverage, the map above highlight
714
714
  | 🇩🇰 Denmark | 0.4 meter | [kbrandwijk](https://github.com/kbrandwijk) |
715
715
  | 🇨🇭 Switzerland | 0.5-2 meter | [kbrandwijk](https://github.com/kbrandwijk) |
716
716
  | 🇨🇿 Czech Republic | 5 meter | [kbrandwijk](https://github.com/kbrandwijk) |
717
+ | 🇱🇹 Lithuania | 1 meter | [Tox3](https://github.com/Tox3) |
718
+
717
719
 
718
720
  ## Special thanks
719
721
 
@@ -684,6 +684,8 @@ In addition to SRTM 30m, which provides global coverage, the map above highlight
684
684
  | 🇩🇰 Denmark | 0.4 meter | [kbrandwijk](https://github.com/kbrandwijk) |
685
685
  | 🇨🇭 Switzerland | 0.5-2 meter | [kbrandwijk](https://github.com/kbrandwijk) |
686
686
  | 🇨🇿 Czech Republic | 5 meter | [kbrandwijk](https://github.com/kbrandwijk) |
687
+ | 🇱🇹 Lithuania | 1 meter | [Tox3](https://github.com/Tox3) |
688
+
687
689
 
688
690
  ## Special thanks
689
691
 
@@ -11,6 +11,7 @@ from maps4fs.generator.dtm.flanders import FlandersProvider
11
11
  from maps4fs.generator.dtm.france import FranceProvider
12
12
  from maps4fs.generator.dtm.hessen import HessenProvider
13
13
  from maps4fs.generator.dtm.italy import ItalyProvider
14
+ from maps4fs.generator.dtm.lithuania import LithuaniaProvider
14
15
  from maps4fs.generator.dtm.mv import MecklenburgVorpommernProvider
15
16
  from maps4fs.generator.dtm.niedersachsen import NiedersachsenProvider
16
17
  from maps4fs.generator.dtm.norway import NorwayProvider
@@ -0,0 +1,64 @@
1
+ """This module contains provider of Lithuania data."""
2
+
3
+ from typing import List
4
+
5
+ import requests
6
+
7
+ from maps4fs.generator.dtm.dtm import DTMProvider
8
+ from maps4fs.generator.dtm.utils import tile_bbox
9
+
10
+
11
+ class LithuaniaProvider(DTMProvider):
12
+ """Provider of Lithuania data."""
13
+
14
+ _code = "lithuania"
15
+ _name = "Lithuania"
16
+ _region = "LT"
17
+ _icon = "🇱🇹"
18
+ _resolution = 1.0
19
+ _author = "[Tox3](https://github.com/Tox3)"
20
+ _is_community = True
21
+ _is_base = False
22
+ _extents = (
23
+ 56.4501789128452, # type: ignore
24
+ 53.8901567283941,
25
+ 26.8198345671209,
26
+ 20.9312456789123,
27
+ )
28
+ _max_tile_size = 4096
29
+ _url = (
30
+ "https://utility.arcgis.com/usrsvcs/servers/fef66dec83c14b0295180ecafa662aa0/"
31
+ "rest/services/DTM_LT2020/ImageServer/exportImage"
32
+ )
33
+
34
+ def download_tiles(self) -> List[str]:
35
+ """Download DTM tiles for Lithuania."""
36
+ bbox = self.get_bbox()
37
+ grid_size = max(1, self.size // self._max_tile_size)
38
+ tile_size = (self.size / grid_size) / 111000 # Convert to degrees
39
+
40
+ raw_tiles = tile_bbox(bbox, tile_size)
41
+ # Fix coordinate swapping from utils.tile_bbox
42
+ tiles = [(t[1], t[3], t[0], t[2]) for t in raw_tiles] # Reorder N,S,E,W correctly
43
+
44
+ download_urls = []
45
+ for i, (north, south, east, west) in enumerate(tiles):
46
+ params = {
47
+ "f": "json",
48
+ "bbox": f"{west},{south},{east},{north}",
49
+ "bboxSR": "4326",
50
+ "imageSR": "3346",
51
+ "format": "tiff",
52
+ "pixelType": "F32",
53
+ "size": f"{self._max_tile_size},{self._max_tile_size}",
54
+ }
55
+
56
+ response = requests.get(
57
+ self.url, params=params, verify=False, timeout=60 # type: ignore
58
+ )
59
+ data = response.json()
60
+ if "href" not in data:
61
+ raise RuntimeError(f"No image URL in response for tile {i}")
62
+ download_urls.append(data["href"])
63
+
64
+ return self.download_tif_files(download_urls, self._tile_directory)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: maps4fs
3
- Version: 1.8.199
3
+ Version: 1.8.201
4
4
  Summary: Generate map templates for Farming Simulator from real places.
5
5
  Author-email: iwatkot <iwatkot@gmail.com>
6
6
  License: MIT License
@@ -714,6 +714,8 @@ In addition to SRTM 30m, which provides global coverage, the map above highlight
714
714
  | 🇩🇰 Denmark | 0.4 meter | [kbrandwijk](https://github.com/kbrandwijk) |
715
715
  | 🇨🇭 Switzerland | 0.5-2 meter | [kbrandwijk](https://github.com/kbrandwijk) |
716
716
  | 🇨🇿 Czech Republic | 5 meter | [kbrandwijk](https://github.com/kbrandwijk) |
717
+ | 🇱🇹 Lithuania | 1 meter | [Tox3](https://github.com/Tox3) |
718
+
717
719
 
718
720
  ## Special thanks
719
721
 
@@ -41,6 +41,7 @@ maps4fs/generator/dtm/flanders.py
41
41
  maps4fs/generator/dtm/france.py
42
42
  maps4fs/generator/dtm/hessen.py
43
43
  maps4fs/generator/dtm/italy.py
44
+ maps4fs/generator/dtm/lithuania.py
44
45
  maps4fs/generator/dtm/mv.py
45
46
  maps4fs/generator/dtm/niedersachsen.py
46
47
  maps4fs/generator/dtm/norway.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "maps4fs"
7
- version = "1.8.199"
7
+ version = "1.8.201"
8
8
  description = "Generate map templates for Farming Simulator from real places."
9
9
  authors = [{name = "iwatkot", email = "iwatkot@gmail.com"}]
10
10
  license = {text = "MIT License"}
File without changes
File without changes
File without changes
File without changes