maps4fs 2.1.3__tar.gz → 2.1.4__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 (33) hide show
  1. {maps4fs-2.1.3 → maps4fs-2.1.4}/PKG-INFO +1 -1
  2. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/generator/component/background.py +4 -0
  3. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/generator/component/base/component.py +1 -1
  4. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/generator/component/dem.py +1 -1
  5. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs.egg-info/PKG-INFO +1 -1
  6. {maps4fs-2.1.3 → maps4fs-2.1.4}/pyproject.toml +1 -1
  7. {maps4fs-2.1.3 → maps4fs-2.1.4}/LICENSE.md +0 -0
  8. {maps4fs-2.1.3 → maps4fs-2.1.4}/README.md +0 -0
  9. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/__init__.py +0 -0
  10. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/generator/__init__.py +0 -0
  11. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/generator/component/__init__.py +0 -0
  12. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/generator/component/base/__init__.py +0 -0
  13. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/generator/component/base/component_image.py +0 -0
  14. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/generator/component/base/component_mesh.py +0 -0
  15. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/generator/component/base/component_xml.py +0 -0
  16. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/generator/component/config.py +0 -0
  17. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/generator/component/grle.py +0 -0
  18. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/generator/component/i3d.py +0 -0
  19. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/generator/component/layer.py +0 -0
  20. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/generator/component/satellite.py +0 -0
  21. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/generator/component/texture.py +0 -0
  22. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/generator/game.py +0 -0
  23. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/generator/map.py +0 -0
  24. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/generator/qgis.py +0 -0
  25. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/generator/settings.py +0 -0
  26. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/generator/statistics.py +0 -0
  27. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs/logger.py +0 -0
  28. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs.egg-info/SOURCES.txt +0 -0
  29. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs.egg-info/dependency_links.txt +0 -0
  30. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs.egg-info/requires.txt +0 -0
  31. {maps4fs-2.1.3 → maps4fs-2.1.4}/maps4fs.egg-info/top_level.txt +0 -0
  32. {maps4fs-2.1.3 → maps4fs-2.1.4}/setup.cfg +0 -0
  33. {maps4fs-2.1.3 → maps4fs-2.1.4}/tests/test_generator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maps4fs
3
- Version: 2.1.3
3
+ Version: 2.1.4
4
4
  Summary: Generate map templates for Farming Simulator from real places.
5
5
  Author-email: iwatkot <iwatkot@gmail.com>
6
6
  License: Apache License 2.0
@@ -527,6 +527,10 @@ class Background(MeshComponent, ImageComponent):
527
527
  int(self.map.dem_settings.water_depth * z_scaling_factor),
528
528
  )
529
529
 
530
+ dem_image = self.blur_edges_by_mask(
531
+ dem_image, water_resources_image, smaller_kernel=3, iterations=5, bigger_kernel=5 # type: ignore
532
+ )
533
+
530
534
  # Save the modified dem_image back to the output path
531
535
  cv2.imwrite(self.output_path, dem_image)
532
536
  self.logger.debug("Water depth subtracted from DEM data: %s", self.output_path)
@@ -417,7 +417,7 @@ class Component:
417
417
  fitted_osm_object = osm_object.intersection(bounds)
418
418
  self.logger.debug("Fitted the osm_object into the bounds: %s", bounds)
419
419
  except Exception as e:
420
- raise ValueError(f"Could not fit the osm_object into the bounds: {e}")
420
+ raise ValueError(f"Could not fit the osm_object into the bounds: {e}") from e
421
421
 
422
422
  if not isinstance(fitted_osm_object, object_type):
423
423
  raise ValueError("The fitted osm_object is not valid (probably splitted into parts).")
@@ -132,7 +132,7 @@ class DEM(ImageComponent):
132
132
  raise ValueError(
133
133
  f"Failed to get DEM data from DTM provider: {e}. "
134
134
  "Try using different DTM provider."
135
- )
135
+ ) from e
136
136
 
137
137
  if len(data.shape) != 2:
138
138
  self.logger.error("DTM provider returned incorrect data: more than 1 channel.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maps4fs
3
- Version: 2.1.3
3
+ Version: 2.1.4
4
4
  Summary: Generate map templates for Farming Simulator from real places.
5
5
  Author-email: iwatkot <iwatkot@gmail.com>
6
6
  License: Apache License 2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "maps4fs"
7
- version = "2.1.3"
7
+ version = "2.1.4"
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 = "Apache License 2.0"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes