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

Support for address data structures in various countries #2

Open
yuiseki opened this issue Mar 12, 2022 · 4 comments
Open

Support for address data structures in various countries #2

yuiseki opened this issue Mar 12, 2022 · 4 comments
Labels
enhancement New feature or request i10n

Comments

@yuiseki
Copy link
Owner

yuiseki commented Mar 12, 2022

The data structure of addresses in OpenStreetMap is quite different from country to country. Currently, only Japan is supported.

@LaoshuBaby
Copy link
Contributor

Attach another thing I found in other countries' data.

图片

Western countries usually show the smaller place first but we asian countries usually show larger place first.

iD seems have a defination for that. It can display addresses in the customary German order.

图片

Maybe we can allow contributor from different country define the display order like <addr:country> <addr:city> <addr:street> (<addr:suburb>) <addr:housenumber>

(This is just a example, not means I suggest this format)

Thank you again for listen my murmur.

(This don't means any feature request, just a discussion about future problem)

@tordans
Copy link

tordans commented Mar 13, 2022

FYI: We talked about the topic of different address formats on an osm conference yesterday. Personally, I think a shared Repository of default address formats per region – maybe based on https://github.com/ideditor/country-coder – would be a great idea. The two informations that came up during the talk was:

  • iD has the address field format hard coded in the main codebase for now (so it is not part of id-tagginge-schema, which also supports per-country-presets)
  • StreetComplete only asks for housenumber, so it has less need for a shared schema, but it has info on where a house number is mapped vs. some other number (that I forgot the name of). The config data of StreetComplete is in yml files in the Repo, but I could only find https://github.com/streetcomplete/StreetComplete/blob/master/res/country_metadata/additionalValidHousenumberRegex.yml right away. There should also be one that shows which countries use house number vs. the other tag.

Maybe this project can be the start to create such a shared address format schema…

@LaoshuBaby
Copy link
Contributor

I think a shared Repository of default address formats per region

Maybe this project can be the start to create such a shared address format schema…

Yes, I agree with you, maybe we make the address format schema as a shared package for every editor, like NSI/Id-tagging-schema done.

Maybe we can allow contributor from different country define the display order like <addr:country> <addr:city> <addr:street> (<addr:suburb>) <addr:housenumber>

I truly want to describe it in a more structure way.

@yuiseki
Copy link
Owner Author

yuiseki commented Mar 19, 2022

Thank you for comments!

I was wondering how https://github.com/ideditor/country-coder works, but it seems to be roughly the same as my approach,
that approach is, in essence, to prepare GeoJSON of country boundaries in advance and to determine given GPS coordinates which country.

This GeoJSON is just 595 KB, so I am very interested in how they made this.
https://github.com/ideditor/country-coder/blob/main/src/data/borders.json

Now, I am able to get the country code for the building.
Also, I am also able to display an input form based on the country code.

If there is an issue, it is likely to involve various cultural practices of how to display address.

In some countries it is natural to write the house number and street first,
but in other countries it is natural to write the prefecture or city first.

This is a problem...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request i10n
Projects
None yet
Development

No branches or pull requests

3 participants