Fixed a critical issue with XML number handling, added missing taxiways for airports

This commit is contained in:
Marcus Str. 2024-12-03 09:58:19 +01:00
parent a58bd71d46
commit c3b9c38b74
2 changed files with 6 additions and 2 deletions

View File

@ -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] )

View File

@ -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