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 mapping tags to name.default aliases #435

Merged
merged 1 commit into from
Aug 31, 2018

Conversation

missinglink
Copy link
Member

@missinglink missinglink commented Jun 26, 2018

this PR allows OSM tags to be mapped as aliases of the name.default field.

the schema/name_osm.js file contains a mapping of OSM tags to name.* fields.

prior to this PR we were only able to map 1:1 from OSM to the Pelias model.

this PR now supports multiple values in that object set as default, in this case the additional tags will be mapped as aliases of the name.default field.

the configuration also adds an additional inenumerable property called _primary which defines which of those is considered the 'primary' name.

an example tag mapping:

osm_tags = { name: "foo", short_name: "bar", reg_name: "baz" }

# prior to the PR
name = {
  default: "foo",
  short: "bar",
  regional: "baz"
}

# after the PR
name = {
  default: [ "foo", "bar" ],
  regional: "baz"
}

I enabled 3 tags as aliases of default: [ short_name, alt_name, loc_name ], of these only short_name is supported by nominatim.

https://wiki.openstreetmap.org/wiki/Names#Key_Variations

The test/fixtures/combined_vancouver_queens.json file in this PR includes a diff which shows and example of the expected changes.

@missinglink missinglink requested a review from orangejulius June 26, 2018 09:57
@missinglink missinglink force-pushed the improved_name_aliases branch from 82a6fb2 to 9e6cab5 Compare June 26, 2018 10:48
@missinglink missinglink merged commit 08b8405 into master Aug 31, 2018
@orangejulius
Copy link
Member

The most recent Nextzen full planet build includes these changes, but I haven't looked at the results yet. I'm spinning up a cluster to do that now.

@orangejulius orangejulius deleted the improved_name_aliases branch November 14, 2018 04:01
michaelkirk pushed a commit to michaelkirk-pelias/openstreetmap that referenced this pull request Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants