From 1f1a2b3740ce0d5044451d31b91140c91d0b63eb Mon Sep 17 00:00:00 2001 From: Symmetricity <184246+Symmetricity@users.noreply.github.com> Date: Thu, 14 May 2026 14:23:13 +0200 Subject: [PATCH] Parse decimal building heights The OpenMapTiles profile parsed height and building level tags with an explicit base argument to tonumber. Newer Lua runtimes reject decimal strings in that mode, so valid values such as height=18.5 and building:levels=3.5 fell back to the default one-floor render height while LuaJIT accepted them. Parse these fields without an explicit base so decimal OSM values are handled consistently across Lua runtimes without changing integer handling or fallback behavior. --- resources/process-openmaptiles.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/process-openmaptiles.lua b/resources/process-openmaptiles.lua index 342c2951..45e53be6 100644 --- a/resources/process-openmaptiles.lua +++ b/resources/process-openmaptiles.lua @@ -868,10 +868,10 @@ function GetPOIRank() end function SetBuildingHeightAttributes() - local height = tonumber(Find("height"), 10) - local minHeight = tonumber(Find("min_height"), 10) - local levels = tonumber(Find("building:levels"), 10) - local minLevel = tonumber(Find("building:min_level"), 10) + local height = tonumber(Find("height")) + local minHeight = tonumber(Find("min_height")) + local levels = tonumber(Find("building:levels")) + local minLevel = tonumber(Find("building:min_level")) local renderHeight = BUILDING_FLOOR_HEIGHT if height or levels then