-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Properly process alt_name tag when there are multiple entries separated by semicolon #581
base: master
Are you sure you want to change the base?
Conversation
doc.setNameAlias( NAME_SCHEMA[key], val2 ); | ||
// `alt_name` may contain multiple names separated by semicolons | ||
// (see https://wiki.openstreetmap.org/wiki/Key:alt_name#Examples) | ||
if (key === 'alt_name') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tbh at glance it seems to be better to "bake" the fact that we need to split by something to NAME_SCHEMA
, but it seems to be a bit of over-engineering for now (but let me know :) )
We're doing something similar already for addresses FYI: openstreetmap/stream/address_extractor.js Lines 48 to 50 in 75309fa
|
Seems this day has come 😆 |
FWIW I really hate this semicolon convention but it's here to stay 🤷♂️ |
Do you think I should change this PR somehow to be aligned with this implementation? :) |
Btw it seems |
For alt specifically? If so let's please open a new issue so we can discuss separately |
Yep, please see #583 |
👋 I did some awesome work for the Pelias project and would love for everyone to have a look at it and provide feedback.
Here's the reason for this change 🚀
OSM's alt_name tag may contain multiple entries which are separated by semicolon (
;
) that's why I propose to split by it and use each entry as separate alias name.See: https://wiki.openstreetmap.org/wiki/Key:alt_name#Examples
Example: https://www.openstreetmap.org/way/31151623
Here's what actually got changed 👏
Just additional
split
call foralt_name
tags :)Here's how others can test the changes 👀
I added new test (which is almost copy-paste of one of existing ones though, but couldn't come up with better solution)