From c3b9c38b7495f7fd51e6c218f1ea85673157650c Mon Sep 17 00:00:00 2001 From: "Marcus Str." Date: Tue, 3 Dec 2024 09:58:19 +0100 Subject: [PATCH] Fixed a critical issue with XML number handling, added missing taxiways for airports --- layergen.py | 4 ++++ osmxml.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/layergen.py b/layergen.py index 98d3267..adf6451 100644 --- a/layergen.py +++ b/layergen.py @@ -538,6 +538,10 @@ class mstr_layergen: if rw_surface == "" or rw_surface == "asphalt": d = randrange(81, 101) layer_comp_pix[x, y] = ( d,d,d,a[3] ) + if self._tag == "aeroway" and self._value == "taxiway": + # Almost the same as above + d = randrange(81, 101) + layer_comp_pix[x, y] = ( d,d,d,a[3] ) if self._tag == "railway": d = randrange(41, 61) layer_comp_pix[x, y] = ( d,d,d,a[3] ) diff --git a/osmxml.py b/osmxml.py index f8ae5a5..85ebdca 100644 --- a/osmxml.py +++ b/osmxml.py @@ -192,7 +192,7 @@ class mstr_osmxml: a = tag.getAttribute("k") v = tag.getAttribute("v") if a == "building:levels": - lvl = int(v) + lvl = int(float(v)) # <- This blew layergen and maskgen at some buildings with 1.5 floors break return lvl @@ -208,7 +208,7 @@ class mstr_osmxml: a = tag.getAttribute("k") v = tag.getAttribute("v") if a == "building:min_level": - lvl = int(v) + lvl = int(float(v)) break return lvl -- 2.30.2