maps4fs 2.1.3__py3-none-any.whl → 2.1.4__py3-none-any.whl

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.
@@ -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
@@ -7,21 +7,21 @@ maps4fs/generator/qgis.py,sha256=Es8hLuqN_KH8lDfnJE6He2rWYbAKJ3RGPn-o87S6CPI,611
7
7
  maps4fs/generator/settings.py,sha256=bjEhn1918lxSsIRgmOXVpYWS3E4y72eqx2Ty7f99JKE,7788
8
8
  maps4fs/generator/statistics.py,sha256=aynS3zbAtiwnU_YLKHPTiiaKW98_suvQUhy1SGBA6mc,2448
9
9
  maps4fs/generator/component/__init__.py,sha256=s01yVVVi8R2xxNvflu2D6wTd9I_g73AMM2x7vAC7GX4,490
10
- maps4fs/generator/component/background.py,sha256=0fTmghJZzmZMqleTmFc5C6A53eZm7nhMpLYmkELAHmQ,33507
10
+ maps4fs/generator/component/background.py,sha256=vYlhJL-kR7i2qkrYnGh_MXstl9RkDVtJ0PzhQz24d-s,33673
11
11
  maps4fs/generator/component/config.py,sha256=uL76h9UwyhZKZmbxz0mBmWtEPN6qYay4epTEqqtej60,8601
12
- maps4fs/generator/component/dem.py,sha256=SH_2Zu5O4dhWtZeOkCwzDF4RU04XhTdpGFYaRYJkdjc,11905
12
+ maps4fs/generator/component/dem.py,sha256=94dxWNAWVCIQ-8ewYmBLRtoeBR9MZ3IrB1frRrZfdgU,11912
13
13
  maps4fs/generator/component/grle.py,sha256=3BKGlR0q0t0NvmqeT81WieS6MIc_UlMQjIDDZiqTiws,27243
14
14
  maps4fs/generator/component/i3d.py,sha256=L-QAbr3Z7Ye5N0BeS_qvY9bqYxYs0eVnRCGWp77etrE,26693
15
15
  maps4fs/generator/component/layer.py,sha256=U_DzJTn1m_yGOtwuvbXxr7oL7YHHBGBcK37lyJNnZDk,6508
16
16
  maps4fs/generator/component/satellite.py,sha256=OsxoNOCgkUtRzL7Geuqubsf6uoKXAIN8jQvrJ7IFeAI,4958
17
17
  maps4fs/generator/component/texture.py,sha256=bpHBwUksEbwPQrdQ8K94m_MIKXnWYnUMvP987JVabAA,34987
18
18
  maps4fs/generator/component/base/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,43
19
- maps4fs/generator/component/base/component.py,sha256=Vgmdsn1ZC37EwWi4Va4uYVt0RnFLiARTtZ-R5GTSrrM,22877
19
+ maps4fs/generator/component/base/component.py,sha256=AP7b6rmYV_HdyyHlCTo9s6fyBXyyqGyBv-DYVynBGws,22884
20
20
  maps4fs/generator/component/base/component_image.py,sha256=n_tHyq8J1zWnb1_8O6fhNNd_4Wfj2VU2QqSAEzJXf60,8119
21
21
  maps4fs/generator/component/base/component_mesh.py,sha256=_thzgjJDroMn-9SBsBmAWizcSsnV9U5445SD18Tx1kc,9090
22
22
  maps4fs/generator/component/base/component_xml.py,sha256=MT-VhU2dEckLFxAgmxg6V3gnv11di_94Qq6atfpOLdc,5342
23
- maps4fs-2.1.3.dist-info/licenses/LICENSE.md,sha256=pTKD_oUexcn-yccFCTrMeLkZy0ifLRa-VNcDLqLZaIw,10749
24
- maps4fs-2.1.3.dist-info/METADATA,sha256=qJ4vDMMwhoupUdurZjg1aROKauLLhWLx9845zyynngY,45431
25
- maps4fs-2.1.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
26
- maps4fs-2.1.3.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
27
- maps4fs-2.1.3.dist-info/RECORD,,
23
+ maps4fs-2.1.4.dist-info/licenses/LICENSE.md,sha256=pTKD_oUexcn-yccFCTrMeLkZy0ifLRa-VNcDLqLZaIw,10749
24
+ maps4fs-2.1.4.dist-info/METADATA,sha256=VLDO4J4xeTO-iuXEryqQ2qHaDsZ73jJBqP1aX_eq7JQ,45431
25
+ maps4fs-2.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
26
+ maps4fs-2.1.4.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
27
+ maps4fs-2.1.4.dist-info/RECORD,,