Properly format addresses according to the country they are in #616

Open
opened 2021-06-18 04:59:11 +00:00 by TimMagee · 19 comments
TimMagee commented 2021-06-18 04:59:11 +00:00 (Migrated from github.com)

In the USA (and possibly in other places that I don't know about), we write out addresses backwards from the way Europeans do it. Instead of writing "Example Street, 123", we write "123 Example Street".

So I propose that when set to a US locale, addresses be written house number first, followed buy street name instead of street name first like in European (and maybe other) locales.

In the USA (and possibly in other places that I don't know about), we write out addresses backwards from the way Europeans do it. Instead of writing "Example Street, 123", we write "123 Example Street". So I propose that when set to a US locale, addresses be written house number first, followed buy street name instead of street name first like in European (and maybe other) locales.
jamescridland commented 2021-07-10 05:45:39 +00:00 (Migrated from github.com)

I would agree with this, and it's also valid for Canada,
UK, Ireland, New Zealand and Australia.

I would agree with this, and it's also valid for Canada, UK, Ireland, New Zealand and Australia.
biodranik commented 2021-07-10 05:47:51 +00:00 (Migrated from github.com)

The idea is good, however, address format should not depend on locale, but on the country where it's located.

The idea is good, however, address format should not depend on locale, but on the country where it's located.
jamescridland commented 2021-07-10 05:50:59 +00:00 (Migrated from github.com)

It looks like https://www.grcdi.nl/gsb/world%20address%20formats.html contains the data needed to do this properly; is this required in some form of ini file alongside country codes? Would be happy to compile something.

It looks like https://www.grcdi.nl/gsb/world%20address%20formats.html contains the data needed to do this properly; is this required in some form of ini file alongside country codes? Would be happy to compile something.
biodranik commented 2021-07-10 06:48:47 +00:00 (Migrated from github.com)

Yeah, it would be great to make an easily editable DB in some form. But we need to think about how to properly bound it to the current countries/regions list. Maybe even integrate the address data (along with some other useful information) into data/countries.txt? @vng Any ideas?

Yeah, it would be great to make an easily editable DB in some form. But we need to think about how to properly bound it to the current countries/regions list. Maybe even integrate the address data (along with some other useful information) into data/countries.txt? @vng Any ideas?
jamescridland commented 2021-07-10 09:06:11 +00:00 (Migrated from github.com)

Screenshot_20210710-185344

Just so we're clear of the use-case here: the second result in this screen, which is https://www.openstreetmap.org/node/7412956206 , should ideally say...

TOMRA
Recycling Centre
9 Counihan Road, Seventeen Mile Rocks QLD

i.e.

**(:name)**
(:place type)
(:addr:housenumber) (addr:street), (addr:suburb) (addr:state)

It currently says "Brisbane City" at the front, which is incorrect (it's a fifteen mile drive from Brisbane City); the suburb isn't mentioned, and nor is the state. For a search result, it's important to help disambiguate between this branch and the one in "Brisbane City, Brisbane, Australia" which is this one, correctly listed as

TOMRA
Recycling Centre
Montague Road, West End QLD

You'll also note that "Recycling Centre" should be spelt this way, in English (Australian), rather than "Recycling Center" (which is US English and incorrect).

![Screenshot_20210710-185344](https://user-images.githubusercontent.com/231941/125157801-4c910c00-e1b0-11eb-830f-f2a8eafb21df.jpg) Just so we're clear of the use-case here: the second result in this screen, which is https://www.openstreetmap.org/node/7412956206 , should ideally say... ``` TOMRA Recycling Centre 9 Counihan Road, Seventeen Mile Rocks QLD ``` i.e. ``` **(:name)** (:place type) (:addr:housenumber) (addr:street), (addr:suburb) (addr:state) ``` It currently says "Brisbane City" at the front, which is incorrect (it's a fifteen mile drive from Brisbane City); the suburb isn't mentioned, and nor is the state. For a search result, it's important to help disambiguate between this branch and the one in "Brisbane City, Brisbane, Australia" which is [this one](https://www.openstreetmap.org/node/6795260067), correctly listed as ``` TOMRA Recycling Centre Montague Road, West End QLD ``` You'll also note that "Recycling Centre" should be spelt this way, in English (Australian), rather than "Recycling Center" (which is US English and incorrect).
biodranik commented 2021-07-10 09:17:10 +00:00 (Migrated from github.com)

Please create a separate issue for non-US English interface translations (type name is translated as a part of the interface).

Also, a separate issue is the incorrect suburb/city detection. It's not fully implemented yet.

Here let's focus on the proper address formatting.

Please create a separate issue for non-US English interface translations (type name is translated as a part of the interface). Also, a separate issue is the incorrect suburb/city detection. It's not fully implemented yet. Here let's focus on the proper address formatting.
jamescridland commented 2021-07-10 09:45:19 +00:00 (Migrated from github.com)

Have done - #829 - for the US English vs non-US English. Thanks.

Let's leave the suburb/city bit for now: it's less jarring than the "Downing Street, 10" :)

Have done - #829 - for the US English vs non-US English. Thanks. Let's leave the suburb/city bit for now: it's less jarring than the "Downing Street, 10" :)
natrius commented 2021-07-23 09:48:38 +00:00 (Migrated from github.com)

As an idea: Ask on startup with drag&drop buttons with a default (for europe maybe)

Please choose on how you enter you adress:
(addr:street) (addr:housenumber), (addr:suburb)/(addr:city) (addr:state)

With the posibility to drag it around so anybody would be able to enter the adress as he likes.

As an idea: Ask on startup with drag&drop buttons with a default (for europe maybe) ``` Please choose on how you enter you adress: (addr:street) (addr:housenumber), (addr:suburb)/(addr:city) (addr:state) ``` With the posibility to drag it around so anybody would be able to enter the adress as he likes.
jamescridland commented 2021-07-23 11:44:21 +00:00 (Migrated from github.com)

This doesn't need to be a user-definable setting: it's a cultural standard.
Personally, I suspect that this is most easily done by using the user settings for the device language.

en is all (addr:housenumber) (addr:street), (addr:suburb), (addr:city) (addr:state)
fr is all (addr:street) (addr:housenumber), (addr:suburb), (addr:city) (addr:state)

Canada is the obvious one here that we need to take care with. I'm checking with a friendly French Canadian, to understand whether this should be set on device language (en-CA vs fr-CA).

If French Canadians would say "Bleu Rue 24" and not "24 Blue Road" then I think it should be relatively easy to include as a setting based on the device language.

This doesn't need to be a user-definable setting: it's a cultural standard. Personally, I suspect that this is most easily done by using the user settings for the device language. en is all (addr:housenumber) (addr:street), (addr:suburb), (addr:city) (addr:state) fr is all (addr:street) (addr:housenumber), (addr:suburb), (addr:city) (addr:state) Canada is the obvious one here that we need to take care with. I'm checking with a friendly French Canadian, to understand whether this should be set on device language (en-CA vs fr-CA). If French Canadians would say "Bleu Rue 24" and not "24 Blue Road" then I think it should be relatively easy to include as a setting based on the device language.
biodranik commented 2021-07-24 07:43:04 +00:00 (Migrated from github.com)

Good idea. Also, in the UK people search using post codes.

Good idea. Also, in the UK people search using post codes.
jamescridland commented 2021-07-26 01:18:04 +00:00 (Migrated from github.com)

Just to come back on my suggestion above... having spoken to French Canadians, they're similar to French French... but to correct what I said above...

en is all (addr:housenumber) (addr:roadname) (addr:roadtype), (addr:suburb), (addr:city) (addr:state)
fr is all (addr:housenumber) (addr:roadtype) (addr:roadname) (addr:suburb), (addr:city) (addr:state)

So, as an Englishman, I'd say "25 Blue Road", but as a Frenchman, I'd say "25 Rue Bleu". The roadtype goes at the start.

The question is probably - and this must have been done before - how do you display a road in Paris to someone who is using an en-US phone? I can't imagine that an English person sees "25 St Michel Rue" when a French person sees "25 Rue St Michel".

Just to come back on my suggestion above... having spoken to French Canadians, they're similar to French French... but to correct what I said above... en is all (addr:housenumber) (addr:roadname) (addr:roadtype), (addr:suburb), (addr:city) (addr:state) fr is all (addr:housenumber) (addr:roadtype) (addr:roadname) (addr:suburb), (addr:city) (addr:state) So, as an Englishman, I'd say "25 Blue Road", but as a Frenchman, I'd say "25 Rue Bleu". The [roadtype](https://meteor.aihw.gov.au/content/index.phtml/itemId/429840) goes at the start. The question is probably - and this must have been done before - how do you display a road in Paris to someone who is using an `en-US` phone? I can't imagine that an English person sees "25 St Michel Rue" when a French person sees "25 Rue St Michel".
biodranik commented 2021-07-26 06:15:59 +00:00 (Migrated from github.com)

Thanks for the updates! We display streets as they are named in OSM. There are some road types synonyms though in the search engine: 99c5b878a0/indexer/search_string_utils.cpp (L352)

Thanks for the updates! We display streets as they are named in OSM. There are some road types synonyms though in the search engine: https://github.com/organicmaps/organicmaps/blob/99c5b878a048b467d1c66cf5a5ff0ce04975c73b/indexer/search_string_utils.cpp#L352
natrius commented 2021-07-26 07:23:31 +00:00 (Migrated from github.com)

Just to be clear to everyone not contributing to OpenStreetMap: In osm adresses are added with a addr:[tag]=[value] as seen in https://wiki.openstreetmap.org/wiki/Key:addr and the roadtype is probably included in addr:street already. But i'm pretty sure the developers are aware of that.

Still, i like the default but i'm sure sometimes it would be good to be able to change the 'default' way. Because people save the adress in contacts freestyle anyway and so they don't have to switch their prefered adress-saving-style so it does not interfere with other apps. (Because they started to save it intentionally wrong for another app. osmand was long not able to use the adress-scheme used in my country - i just never used it)

Just to be clear to everyone not contributing to OpenStreetMap: In osm adresses are added with a `addr:[tag]=[value]` as seen in https://wiki.openstreetmap.org/wiki/Key:addr and the roadtype is probably included in `addr:street` already. But i'm pretty sure the developers are aware of that. Still, i like the default but i'm sure sometimes it would be good to be able to change the 'default' way. Because people save the adress in contacts freestyle anyway and so they don't have to switch their prefered adress-saving-style so it does not interfere with other apps. (Because they started to save it intentionally wrong for another app. osmand was long not able to use the adress-scheme used in my country - i just never used it)
jamescridland commented 2021-07-26 09:35:22 +00:00 (Migrated from github.com)

@biodranik "We display streets as they are named in OSM."

I think there's some confusion here - partly because this has become a messy report. Sorry. My fault.

Screen Shot 2021-07-26 at 7 32 40 pm

...is the output for this query.

Organic Maps would display this as "Downing Street 10".

It is "10 Downing Street".

@biodranik "We display streets as they are named in OSM." I think there's some confusion here - partly because this has become a messy report. Sorry. My fault. ![Screen Shot 2021-07-26 at 7 32 40 pm](https://user-images.githubusercontent.com/231941/126967326-012f77cb-2e2b-4353-a9ed-e1b41058b380.png) ...is the output for [this query](https://nominatim.openstreetmap.org/search?q=10+downing+street,+London&addressdetails=1&format=json). Organic Maps would display this as "Downing Street 10". It is "10 Downing Street".
biodranik commented 2021-07-26 16:11:17 +00:00 (Migrated from github.com)

@jamescridland I answered above to that question:

how do you display a road in Paris to someone who is using an en-US phone? I can't imagine that an English person sees "25 St Michel Rue" when a French person sees "25 Rue St Michel".

It was not about the house number ordering.

@natrius we discuss displaying, not editing, so OSM should be safe here :)
The obvious way is how it's displayed in other maps, and in all printed booklets.

@jamescridland I answered above to that question: > how do you display a road in Paris to someone who is using an en-US phone? I can't imagine that an English person sees "25 St Michel Rue" when a French person sees "25 Rue St Michel". It was not about the house number ordering. @natrius we discuss displaying, not editing, so OSM should be safe here :) The obvious way is how it's displayed in other maps, and in all printed booklets.
TheAdventurer64 commented 2022-06-18 20:56:17 +00:00 (Migrated from github.com)

Here's the way I think we should approach the issue: We should base it on what country you're in. For example, if you're in the United States, the address should be formatted as "123 Example Street". If you're in the United Kingdom,addresses should be formatted as "Example Street, 123". This is the way that software like the iD editor and Google Maps do addresses, and I believe that Organic Maps can do the same.

Here's the way I think we should approach the issue: We should base it on what country you're in. For example, if you're in the United States, the address should be formatted as "123 Example Street". If you're in the United Kingdom,addresses should be formatted as "Example Street, 123". This is the way that software like the iD editor and Google Maps do addresses, and I believe that Organic Maps can do the same.
biodranik commented 2022-06-18 21:04:18 +00:00 (Migrated from github.com)

@TheAdventurer64 What if I travel to the US from the EU and check/search for some place in the US? Each country should have its own format.

@TheAdventurer64 What if I travel to the US from the EU and check/search for some place in the US? Each country should have its own format.
TheAdventurer64 commented 2022-06-18 21:34:56 +00:00 (Migrated from github.com)

@TheAdventurer64 What if I travel to the US from the EU and check/search for some place in the US? Each country should have its own format.

My bad - I should've specified - the address formatting should be based on which country you're searching in. If you're searching for places that are within the US, the address should be "123 Street". If you're searching for places located inside the UK, addresses should be formatted to "Street, 123".

> @TheAdventurer64 What if I travel to the US from the EU and check/search for some place in the US? Each country should have its own format. My bad - I should've specified - the address formatting should be based on which country you're searching in. If you're searching for places that are within the US, the address should be "123 Street". If you're searching for places located inside the UK, addresses should be formatted to "Street, 123".
jamescridland commented 2022-06-19 09:03:06 +00:00 (Migrated from github.com)

Agree with setting this by country, not by user locale.

But the UK is 12 High Street. Not High Street, 12.

https://james.cridland.nethttps://podnews.net

Sent from a mobile device. May have been dictated.

On Sun, 19 June 2022, 07:35 TheAdventurer64, @.***>
wrote:

@TheAdventurer64 https://github.com/TheAdventurer64 What if I travel to
the US from the EU and check/search for some place in the US? Each country
should have its own format.

My bad - I should've specified - the address formatting should be based on
which country you're searching in. If you're searching for places that are
within the US, the address should be "123 Street". If you're searching for
places located inside the UK, addresses should be formatted to "Street,
123".


Reply to this email directly, view it on GitHub
https://git.omaps.dev/organicmaps/organicmaps/issues/616#issuecomment-1159568770,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABYUBOIVKTGNT6SCN3GP3TVPY6IXANCNFSM4645ZFXA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Agree with setting this by country, not by user locale. But the UK is 12 High Street. Not High Street, 12. https://james.cridland.net • https://podnews.net Sent from a mobile device. May have been dictated. On Sun, 19 June 2022, 07:35 TheAdventurer64, ***@***.***> wrote: > @TheAdventurer64 <https://github.com/TheAdventurer64> What if I travel to > the US from the EU and check/search for some place in the US? Each country > should have its own format. > > My bad - I should've specified - the address formatting should be based on > which country you're searching in. If you're searching for places that are > within the US, the address should be "123 Street". If you're searching for > places located inside the UK, addresses should be formatted to "Street, > 123". > > — > Reply to this email directly, view it on GitHub > <https://git.omaps.dev/organicmaps/organicmaps/issues/616#issuecomment-1159568770>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AABYUBOIVKTGNT6SCN3GP3TVPY6IXANCNFSM4645ZFXA> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
This repo is archived. You cannot comment on issues.
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: organicmaps/organicmaps-tmp#616
No description provided.