I would like to show OSM POIs like shops on a map, and display their tag details when clicking on a POI. I would like to remove the addr:* address tags from the details, and instead display them as “full address” on one line. This would turn e.g.
into
I’m fully aware that a) Addressing systems around the world are different and complicated: Some places use blocks or suburbs instead of streets, you need unit or apartment numbers, addresses can be multilingual, and so on. Is there some description of rules how to put the address parts together? Maybe different rules per region? Alternatively, is there a universal rule that could be applied and results in addresses that are mostly understood worldwide? Something like “Use addr:* in this order: housenumber, street, block, …; omit any missing tag; comma-separate them” Is there even some code or library which implements something like this? asked 04 Dec '19, 09:35 hfs |
Have a look at the address format project from OpenCageData. This is a project that collects the different formats for all countries around the world and also provides scripts for formatting. answered 07 Dec '19, 08:46 lonvia |
There are so many different address formats. See (for example) this site. I am not aware of an existing OSM tool to format an address based on country, although that doesn't mean there isn't one. answered 04 Dec '19, 11:28 EdLoach ♦ 1
That site is wrong, there are villages in the UK, Switzerland and France where the roads do not have names (there may be quarters/viertel or hamlets with names which may be useful for addressing. Specific examples Scuol, Ftan, Ardez in the Engadin, Plounevezel in Finistere. Additionally, in some villages in the UK, there may be street names but these are not conventionally part of the address (e.g., Caio).
(04 Dec '19, 11:39)
SK53 ♦
1
I was using it more to illustrate there are lots of formats rather than it being an exhaustive list. I've just checked a postcode from a house in a local hamlet on an unnamed road, and the Postcode Finder on the Royal Mail website has them as house name, hamlet name, parish name, postal town, postcode.
(04 Dec '19, 12:00)
EdLoach ♦
|