christchurch, new zealand - non-standard housenumber problems

hi,
i’ve been using ‘mkgmap’ to try and create garmin maps for new zealand, but struck a problem with many addr:housenumber keys not being indexed. the problem seems to be, in large part, due to multiple dwellings at the same address. eg “4/24 London Street, Christchurch, New Zealand”. the ‘housenumber’ on OSM is 4/24, but the garmin device (nuvi 50LM) doesn’t know how to search this. just “24 London…” fails to bring up any related options.

how can i simply strip out the subordinate numbers? or is there a better solution?

cheers,
robert :slight_smile:

1 Like

You have to tweak the value in mkgmap:housenumber
The current rule in the default style is


mkgmap:housenumber!=* & addr:housenumber=* { set mkgmap:housenumber='${addr:housenumber}' }

You probably need something like

mkgmap:housenumber~'[0-9]*/[0-9]*' {set mkgmap:housenumber=${mkgmap:housenumber|part:"/:2"} }

after that line. Not sure about the exact syntax.
See also https://www.mkgmap.org.uk/doc/pdf/style-manual.pdf

excellent, used a slight modification of what you suggested (not using a regular expression but instead using inbuilt filter), and the problem seems to have been solved :smiley:

cheers,
rob :slight_smile: