diff --git a/maps4fs/generator/component/base/component.py b/maps4fs/generator/component/base/component.py index 9e05e36..2524ad2 100644 --- a/maps4fs/generator/component/base/component.py +++ b/maps4fs/generator/component/base/component.py @@ -551,7 +551,7 @@ def interpolate_points( return interpolated_polyline - def get_z_scaling_factor(self) -> float: + def get_z_scaling_factor(self, ignore_height_scale_multiplier: bool = False) -> float: """Calculates the scaling factor for the Z axis based on the map settings. Returns: @@ -560,7 +560,7 @@ def get_z_scaling_factor(self) -> float: scaling_factor = 1 / self.map.dem_settings.multiplier - if self.map.shared_settings.height_scale_multiplier: + if self.map.shared_settings.height_scale_multiplier and not ignore_height_scale_multiplier: scaling_factor *= self.map.shared_settings.height_scale_multiplier if self.map.shared_settings.mesh_z_scaling_factor: scaling_factor *= 1 / self.map.shared_settings.mesh_z_scaling_factor diff --git a/maps4fs/generator/component/i3d.py b/maps4fs/generator/component/i3d.py index 8cd9b31..c946ef0 100644 --- a/maps4fs/generator/component/i3d.py +++ b/maps4fs/generator/component/i3d.py @@ -581,6 +581,6 @@ def get_z_coordinate_from_dem(self, not_resized_dem: np.ndarray, x: int, y: int) y = int(max(0, min(y, dem_y_size - 1))) z = not_resized_dem[y, x] - z *= self.get_z_scaling_factor() + z *= self.get_z_scaling_factor(ignore_height_scale_multiplier=True) return z diff --git a/maps4fs/generator/map.py b/maps4fs/generator/map.py index dbcae1b..b94df12 100644 --- a/maps4fs/generator/map.py +++ b/maps4fs/generator/map.py @@ -89,7 +89,6 @@ def __init__( "custom_osm": bool(custom_osm), "is_public": kwargs.get("is_public", False), } - print(main_settings) send_main_settings(main_settings) except Exception as e: self.logger.error("Error sending main settings: %s", e)