maps4fs 1.8.200__tar.gz → 1.8.202__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.200 → maps4fs-1.8.202}/PKG-INFO +1 -1
  2. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/__init__.py +1 -1
  3. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/lithuania.py +33 -16
  4. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs.egg-info/PKG-INFO +1 -1
  5. {maps4fs-1.8.200 → maps4fs-1.8.202}/pyproject.toml +1 -1
  6. {maps4fs-1.8.200 → maps4fs-1.8.202}/LICENSE.md +0 -0
  7. {maps4fs-1.8.200 → maps4fs-1.8.202}/README.md +0 -0
  8. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/__init__.py +0 -0
  9. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/component/__init__.py +0 -0
  10. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/component/background.py +0 -0
  11. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/component/base/__init__.py +0 -0
  12. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/component/base/component.py +0 -0
  13. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/component/base/component_image.py +0 -0
  14. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/component/base/component_mesh.py +0 -0
  15. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/component/base/component_xml.py +0 -0
  16. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/component/config.py +0 -0
  17. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/component/grle.py +0 -0
  18. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/component/i3d.py +0 -0
  19. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/component/layer.py +0 -0
  20. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/component/satellite.py +0 -0
  21. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/component/texture.py +0 -0
  22. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dem.py +0 -0
  23. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/__init__.py +0 -0
  24. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/arctic.py +0 -0
  25. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/baden.py +0 -0
  26. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/base/wcs.py +0 -0
  27. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/base/wms.py +0 -0
  28. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/bavaria.py +0 -0
  29. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/canada.py +0 -0
  30. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/czech.py +0 -0
  31. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/denmark.py +0 -0
  32. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/dtm.py +0 -0
  33. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/england.py +0 -0
  34. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/finland.py +0 -0
  35. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/flanders.py +0 -0
  36. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/france.py +0 -0
  37. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/hessen.py +0 -0
  38. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/italy.py +0 -0
  39. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/mv.py +0 -0
  40. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/niedersachsen.py +0 -0
  41. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/norway.py +0 -0
  42. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/nrw.py +0 -0
  43. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/rema.py +0 -0
  44. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/sachsenanhalt.py +0 -0
  45. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/scotland.py +0 -0
  46. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/spain.py +0 -0
  47. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/srtm.py +0 -0
  48. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/switzerland.py +0 -0
  49. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/usgs_wcs.py +0 -0
  50. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/dtm/utils.py +0 -0
  51. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/game.py +0 -0
  52. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/map.py +0 -0
  53. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/qgis.py +0 -0
  54. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/generator/settings.py +0 -0
  55. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/logger.py +0 -0
  56. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/toolbox/__init__.py +0 -0
  57. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/toolbox/background.py +0 -0
  58. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/toolbox/custom_osm.py +0 -0
  59. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs/toolbox/dem.py +0 -0
  60. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs.egg-info/SOURCES.txt +0 -0
  61. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs.egg-info/dependency_links.txt +0 -0
  62. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs.egg-info/requires.txt +0 -0
  63. {maps4fs-1.8.200 → maps4fs-1.8.202}/maps4fs.egg-info/top_level.txt +0 -0
  64. {maps4fs-1.8.200 → maps4fs-1.8.202}/setup.cfg +0 -0
  65. {maps4fs-1.8.200 → maps4fs-1.8.202}/tests/test_generator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: maps4fs
3
- Version: 1.8.200
3
+ Version: 1.8.202
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
@@ -5,4 +5,4 @@ import maps4fs.generator.settings as settings
5
5
  from maps4fs.generator.dtm.dtm import DTMProvider
6
6
  from maps4fs.generator.game import Game
7
7
  from maps4fs.generator.map import Map
8
- from maps4fs.logger import Logger
8
+ from maps4fs.logger import Logger
@@ -1,11 +1,16 @@
1
1
  """This module contains provider of Lithuania data."""
2
2
 
3
3
  from typing import List
4
+
4
5
  import requests
6
+
5
7
  from maps4fs.generator.dtm.dtm import DTMProvider
6
8
  from maps4fs.generator.dtm.utils import tile_bbox
7
9
 
10
+
8
11
  class LithuaniaProvider(DTMProvider):
12
+ """Provider of Lithuania data."""
13
+
9
14
  _code = "lithuania"
10
15
  _name = "Lithuania"
11
16
  _region = "LT"
@@ -14,36 +19,48 @@ class LithuaniaProvider(DTMProvider):
14
19
  _author = "[Tox3](https://github.com/Tox3)"
15
20
  _is_community = True
16
21
  _is_base = False
17
- _extents = (56.4501789128452, 53.8901567283941, 26.8198345671209, 20.9312456789123)
22
+ _extents = [
23
+ (
24
+ 56.4501789128452,
25
+ 53.8901567283941,
26
+ 26.8198345671209,
27
+ 20.9312456789123,
28
+ )
29
+ ]
18
30
  _max_tile_size = 4096
19
- _url = "https://utility.arcgis.com/usrsvcs/servers/fef66dec83c14b0295180ecafa662aa0/rest/services/DTM_LT2020/ImageServer/exportImage"
31
+ _url = (
32
+ "https://utility.arcgis.com/usrsvcs/servers/fef66dec83c14b0295180ecafa662aa0/"
33
+ "rest/services/DTM_LT2020/ImageServer/exportImage"
34
+ )
20
35
 
21
36
  def download_tiles(self) -> List[str]:
22
37
  """Download DTM tiles for Lithuania."""
23
38
  bbox = self.get_bbox()
24
39
  grid_size = max(1, self.size // self._max_tile_size)
25
40
  tile_size = (self.size / grid_size) / 111000 # Convert to degrees
26
-
41
+
27
42
  raw_tiles = tile_bbox(bbox, tile_size)
28
43
  # Fix coordinate swapping from utils.tile_bbox
29
44
  tiles = [(t[1], t[3], t[0], t[2]) for t in raw_tiles] # Reorder N,S,E,W correctly
30
-
45
+
31
46
  download_urls = []
32
47
  for i, (north, south, east, west) in enumerate(tiles):
33
48
  params = {
34
- 'f': 'json',
35
- 'bbox': f"{west},{south},{east},{north}",
36
- 'bboxSR': '4326',
37
- 'imageSR': '3346',
38
- 'format': 'tiff',
39
- 'pixelType': 'F32',
40
- 'size': f"{self._max_tile_size},{self._max_tile_size}"
49
+ "f": "json",
50
+ "bbox": f"{west},{south},{east},{north}",
51
+ "bboxSR": "4326",
52
+ "imageSR": "3346",
53
+ "format": "tiff",
54
+ "pixelType": "F32",
55
+ "size": f"{self._max_tile_size},{self._max_tile_size}",
41
56
  }
42
-
43
- response = requests.get(self.url, params=params, verify=False, timeout=60)
57
+
58
+ response = requests.get(
59
+ self.url, params=params, verify=False, timeout=60 # type: ignore
60
+ )
44
61
  data = response.json()
45
- if 'href' not in data:
62
+ if "href" not in data:
46
63
  raise RuntimeError(f"No image URL in response for tile {i}")
47
- download_urls.append(data['href'])
64
+ download_urls.append(data["href"])
48
65
 
49
- return self.download_tif_files(download_urls, self._tile_directory)
66
+ 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.200
3
+ Version: 1.8.202
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "maps4fs"
7
- version = "1.8.200"
7
+ version = "1.8.202"
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