]> marstr Code Repo - marstr/orthographic.git/commitdiff
Fixed a critical issue with XML number handling, added missing taxiways for airports
authorMarcus Str. <marcus@marstr.online>
Tue, 3 Dec 2024 08:58:19 +0000 (09:58 +0100)
committerMarcus Str. <marcus@marstr.online>
Tue, 3 Dec 2024 08:58:19 +0000 (09:58 +0100)
layergen.py
osmxml.py

index 98d326719b020a810b69ad2fa110a702364a34a4..adf6451673050435af282c7a9b77f746bccd3cf2 100644 (file)
@@ -538,6 +538,10 @@ class mstr_layergen:
                             if rw_surface == "" or rw_surface == "asphalt":\r
                                 d = randrange(81, 101)\r
                                 layer_comp_pix[x, y] = ( d,d,d,a[3] )\r
+                        if self._tag == "aeroway" and self._value == "taxiway":\r
+                            # Almost the same as above\r
+                            d = randrange(81, 101)\r
+                            layer_comp_pix[x, y] = ( d,d,d,a[3] )\r
                         if self._tag == "railway":\r
                             d = randrange(41, 61)\r
                             layer_comp_pix[x, y] = ( d,d,d,a[3] )\r
index f8ae5a5332a8a5837e93ee3981c9d1efa9bb5bef..85ebdca3e70016c126ddbaf3df4b4a2ee657d915 100644 (file)
--- a/osmxml.py
+++ b/osmxml.py
@@ -192,7 +192,7 @@ class mstr_osmxml:
                     a = tag.getAttribute("k")\r
                     v = tag.getAttribute("v")\r
                     if a == "building:levels":\r
-                        lvl = int(v)\r
+                        lvl = int(float(v)) # <- This blew layergen and maskgen at some buildings with 1.5 floors\r
                         break\r
         return lvl\r
     \r
@@ -208,7 +208,7 @@ class mstr_osmxml:
                     a = tag.getAttribute("k")\r
                     v = tag.getAttribute("v")\r
                     if a == "building:min_level":\r
-                        lvl = int(v)\r
+                        lvl = int(float(v))\r
                         break\r
         return lvl\r
     \r