AnsweredAssumed Answered

OpenStreetmap tag as label

Question asked by jussi.lehtonenesri-fi-esridist Employee on Aug 27, 2020
Latest reply on Aug 28, 2020 by jussi.lehtonenesri-fi-esridist


I am trying to use an Arcade -expression to create house number labels for building polygons downloaded from OpenStreetMap. OSM has the building number in "Tags" -field among several other tags. I have been trying multiple approaches where I pick the phrase "housenumber" and then return any characters after that before the closing marker.

I guess the closest I got was to Split the text but I get an error when trying to return arrays other than [0].

The "housenumber" -tag is not always the last tag so counting characters from the end does not work.


Here's how the original "Tags" -field looks like

"osm_uid"=>"38239", "building"=>"terrace", "osm_user"=>"Daeron", "way_area"=>"1.26619e-07", "addr:street"=>"Kantakyläntie", "osm_version"=>"4", "osm_changeset"=>"13506017", "osm_timestamp"=>"2012-10-15T13:31:04Z", "addr:housenumber"=>"7"

What I would like to label is just the



The house number can be anything between 1 and 5 characters such as "13-15"