Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Country-Specific Address display #15

Open
species opened this issue Aug 3, 2016 · 5 comments
Open

Country-Specific Address display #15

species opened this issue Aug 3, 2016 · 5 comments

Comments

@species
Copy link
Contributor

species commented Aug 3, 2016

In some countries, an address is written in the form

  • $housenumber $streetname

in others

  • $streetname $housenumber.

This should be switchted dependent on the country the POI is in.
Is there somewhere a list of the different address formats worldwide?

@matt-wallis
Copy link

Is this what you're looking for?
https://en.wikipedia.org/wiki/Address_(geography)#Mailing_address_format_by_country
It specifies address formats for 62 countries, so clearly it is not exhaustive. Maybe there's a sensible default for countries not mentioned here?

@josefkreitmayer
Copy link
Member

Thx @matt-wallis
we went throug it, and found quite some specifics for the countries we were working with up to now:

  • France: no. before street
  • Hungary: city first, post code in the end.
  • Ireland: post code after city/town/region
  • UK: post code after city/town/region
    -Rumania, post code after city/town
  • Latvia: post code after city/town (also distinction between city and rural addresses, we cannot take into consideration)
  • Italy: also has region in the address

@species
Copy link
Contributor Author

species commented Aug 4, 2016

Does anyone know of a machine-readable version of this list?
We're using OpenStreetMap's addr:* scheme, as it allows more flexibility than e.g. schema.org's PostalAddress.

This could be a good starting point for a new library to transform addresses into a country-specific format for display.
@tyrasd would it make sense to start a small library on this, or is there already one?

@tyrasd
Copy link
Collaborator

tyrasd commented Aug 5, 2016

Does anyone know of a machine-readable version of this list?

iD has country specific address field ordering (intended for user input, but requirements for output should be quite symetrical, I'd think): https://github.com/openstreetmap/iD/blob/master/data/address-formats.json

Italy: also has region in the address

@josefkreitmayer: You mean the abbreviated province (e.g. BZ), not the region. Also, it's not as common anymore nowadays.

@josefkreitmayer
Copy link
Member

@josefkreitmayer: You mean the abbreviated province (e.g. BZ), not the region. Also, it's not as common anymore nowadays.

Apparently it is a must "[postal code + city + province code]".
I verified the information here:

It is not mandatory for big cities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants