From ed86aef731e6d71450a54f1fce18ab5443f624a0 Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Mon, 24 Jan 2022 00:55:23 +0300 Subject: [PATCH] Fix construction wall color. --- map_machine/feature/building.py | 2 +- map_machine/geometry/vector.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/map_machine/feature/building.py b/map_machine/feature/building.py index 3268543..2d08067 100644 --- a/map_machine/feature/building.py +++ b/map_machine/feature/building.py @@ -17,7 +17,7 @@ from map_machine.osm.osm_reader import OSMNode from map_machine.scheme import Scheme BUILDING_MINIMAL_HEIGHT: float = 8.0 -BUILDING_SCALE: float = 1.0 +BUILDING_SCALE: float = 0.33 LEVEL_HEIGHT: float = 2.5 SHADE_SCALE: float = 0.4 diff --git a/map_machine/geometry/vector.py b/map_machine/geometry/vector.py index 5871743..d065369 100644 --- a/map_machine/geometry/vector.py +++ b/map_machine/geometry/vector.py @@ -126,6 +126,8 @@ class Segment: difference: np.ndarray = point_2 - point_1 vector: np.ndarray = difference / np.linalg.norm(difference) + if vector[0] > 0: + vector = -vector self.angle: float = ( np.arccos(np.dot(vector, np.array((0.0, 1.0)))) / np.pi )