maps4fs 1.8.202__tar.gz → 1.8.204__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.202 → maps4fs-1.8.204}/PKG-INFO +9 -1
  2. {maps4fs-1.8.202 → maps4fs-1.8.204}/README.md +8 -0
  3. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dem.py +7 -9
  4. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs.egg-info/PKG-INFO +9 -1
  5. {maps4fs-1.8.202 → maps4fs-1.8.204}/pyproject.toml +1 -1
  6. {maps4fs-1.8.202 → maps4fs-1.8.204}/LICENSE.md +0 -0
  7. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/__init__.py +0 -0
  8. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/__init__.py +0 -0
  9. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/component/__init__.py +0 -0
  10. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/component/background.py +0 -0
  11. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/component/base/__init__.py +0 -0
  12. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/component/base/component.py +0 -0
  13. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/component/base/component_image.py +0 -0
  14. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/component/base/component_mesh.py +0 -0
  15. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/component/base/component_xml.py +0 -0
  16. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/component/config.py +0 -0
  17. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/component/grle.py +0 -0
  18. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/component/i3d.py +0 -0
  19. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/component/layer.py +0 -0
  20. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/component/satellite.py +0 -0
  21. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/component/texture.py +0 -0
  22. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/__init__.py +0 -0
  23. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/arctic.py +0 -0
  24. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/baden.py +0 -0
  25. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/base/wcs.py +0 -0
  26. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/base/wms.py +0 -0
  27. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/bavaria.py +0 -0
  28. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/canada.py +0 -0
  29. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/czech.py +0 -0
  30. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/denmark.py +0 -0
  31. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/dtm.py +0 -0
  32. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/england.py +0 -0
  33. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/finland.py +0 -0
  34. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/flanders.py +0 -0
  35. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/france.py +0 -0
  36. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/hessen.py +0 -0
  37. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/italy.py +0 -0
  38. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/lithuania.py +0 -0
  39. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/mv.py +0 -0
  40. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/niedersachsen.py +0 -0
  41. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/norway.py +0 -0
  42. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/nrw.py +0 -0
  43. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/rema.py +0 -0
  44. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/sachsenanhalt.py +0 -0
  45. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/scotland.py +0 -0
  46. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/spain.py +0 -0
  47. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/srtm.py +0 -0
  48. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/switzerland.py +0 -0
  49. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/usgs_wcs.py +0 -0
  50. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/dtm/utils.py +0 -0
  51. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/game.py +0 -0
  52. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/map.py +0 -0
  53. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/qgis.py +0 -0
  54. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/generator/settings.py +0 -0
  55. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/logger.py +0 -0
  56. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/toolbox/__init__.py +0 -0
  57. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/toolbox/background.py +0 -0
  58. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/toolbox/custom_osm.py +0 -0
  59. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs/toolbox/dem.py +0 -0
  60. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs.egg-info/SOURCES.txt +0 -0
  61. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs.egg-info/dependency_links.txt +0 -0
  62. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs.egg-info/requires.txt +0 -0
  63. {maps4fs-1.8.202 → maps4fs-1.8.204}/maps4fs.egg-info/top_level.txt +0 -0
  64. {maps4fs-1.8.202 → maps4fs-1.8.204}/setup.cfg +0 -0
  65. {maps4fs-1.8.202 → maps4fs-1.8.204}/tests/test_generator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: maps4fs
3
- Version: 1.8.202
3
+ Version: 1.8.204
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
@@ -225,6 +225,14 @@ docker run -d -p 8501:8501 --name maps4fs iwatkot/maps4fs
225
225
  4. Fill in the required fields and click on the `Generate` button.
226
226
  5. When the map is generated click on the `Download` button to get the map.
227
227
 
228
+ ➡️ If you don't need Blender backend, you can use the **lite** version of the Docker image.
229
+
230
+ ```bash
231
+ docker run -d -p 8501:8501 --name maps4fs iwatkot/maps4fs:*.*.*_lite
232
+ ```
233
+
234
+ Remember to replace `*.*.*` with the version you want to use, e.g. `iwatkot/maps4fs:1.8.202_lite`. Also, pay attention that some features will not work in the lite version, such as removing the center part of the background mesh.
235
+
228
236
  ### Option 3: Python package or source code
229
237
 
230
238
  🔴 Recommended for developers.
@@ -195,6 +195,14 @@ docker run -d -p 8501:8501 --name maps4fs iwatkot/maps4fs
195
195
  4. Fill in the required fields and click on the `Generate` button.
196
196
  5. When the map is generated click on the `Download` button to get the map.
197
197
 
198
+ ➡️ If you don't need Blender backend, you can use the **lite** version of the Docker image.
199
+
200
+ ```bash
201
+ docker run -d -p 8501:8501 --name maps4fs iwatkot/maps4fs:*.*.*_lite
202
+ ```
203
+
204
+ Remember to replace `*.*.*` with the version you want to use, e.g. `iwatkot/maps4fs:1.8.202_lite`. Also, pay attention that some features will not work in the lite version, such as removing the center part of the background mesh.
205
+
198
206
  ### Option 3: Python package or source code
199
207
 
200
208
  🔴 Recommended for developers.
@@ -127,13 +127,11 @@ class DEM(Component):
127
127
 
128
128
  if len(data.shape) != 2:
129
129
  self.logger.error("DTM provider returned incorrect data: more than 1 channel.")
130
- self._save_empty_dem(dem_output_resolution)
131
- return
130
+ raise ValueError("DTM provider returned incorrect data: more than 1 channel.")
132
131
 
133
132
  if data.dtype not in ["int16", "uint16", "float", "float32"]:
134
133
  self.logger.error("DTM provider returned incorrect data type: %s.", data.dtype)
135
- self._save_empty_dem(dem_output_resolution)
136
- return
134
+ raise ValueError(f"DTM provider returned incorrect data type: {data.dtype}.")
137
135
 
138
136
  self.logger.debug(
139
137
  "DEM data was retrieved from DTM provider. Shape: %s, dtype: %s. Min: %s, max: %s.",
@@ -143,6 +141,11 @@ class DEM(Component):
143
141
  data.max(),
144
142
  )
145
143
 
144
+ # Check if the data contains any non zero values, otherwise raise an error.
145
+ if not np.any(data):
146
+ self.logger.error("DTM provider returned empty data.")
147
+ raise ValueError("DTM provider returned empty data.")
148
+
146
149
  # 1. Resize DEM data to the output resolution.
147
150
  resampled_data = self.resize_to_output(data)
148
151
 
@@ -312,11 +315,6 @@ class DEM(Component):
312
315
  output_width=output_width,
313
316
  )
314
317
 
315
- def _save_empty_dem(self, dem_output_resolution: tuple[int, int]) -> None:
316
- """Saves empty DEM file filled with zeros."""
317
- dem_data = np.zeros(dem_output_resolution, dtype="uint16")
318
- cv2.imwrite(self._dem_path, dem_data)
319
-
320
318
  def info_sequence(self) -> dict[Any, Any] | None: # type: ignore
321
319
  """Returns the information sequence for the component. Must be implemented in the child
322
320
  class. If the component does not have an information sequence, an empty dictionary must be
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: maps4fs
3
- Version: 1.8.202
3
+ Version: 1.8.204
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
@@ -225,6 +225,14 @@ docker run -d -p 8501:8501 --name maps4fs iwatkot/maps4fs
225
225
  4. Fill in the required fields and click on the `Generate` button.
226
226
  5. When the map is generated click on the `Download` button to get the map.
227
227
 
228
+ ➡️ If you don't need Blender backend, you can use the **lite** version of the Docker image.
229
+
230
+ ```bash
231
+ docker run -d -p 8501:8501 --name maps4fs iwatkot/maps4fs:*.*.*_lite
232
+ ```
233
+
234
+ Remember to replace `*.*.*` with the version you want to use, e.g. `iwatkot/maps4fs:1.8.202_lite`. Also, pay attention that some features will not work in the lite version, such as removing the center part of the background mesh.
235
+
228
236
  ### Option 3: Python package or source code
229
237
 
230
238
  🔴 Recommended for developers.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "maps4fs"
7
- version = "1.8.202"
7
+ version = "1.8.204"
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