Canonical common brand names for OpenStreetMap
What is it?
The goal of this project is to maintain a canonical list of commonly used names for suggesting consistent spelling and tagging of features in OpenStreetMap.
How it's used
When mappers create features in OpenStreetMap, they are not always consistent about how they
name and tag things. For example, we may prefer
McDonald's tagged as
but we see many examples of other spellings (
Building a canonical name index allows two very useful things:
- We can suggest the most "correct" way to tag things as users create them while editing.
- We can scan the OSM data for "incorrect" features and produce lists for review and cleanup.
The name-suggestion-index is in use in iD when adding a new item
Currently used in:
- iD (see above)
- JOSM presets available
Browse the index
You can browse the index at http://osmlab.github.io/name-suggestion-index/brands/index.html to see which brands are missing Wikidata links, or have incomplete Wikipedia pages.
- Read the project Code of Conduct and remember to be nice to one another.
- See CONTRIBUTING.md for info about how to contribute to this index.
We're always looking for help! If you have any questions or want to reach out to a maintainer, ping
- OpenStreetMap US Slack
- Clone this project, for example:
git clone firstname.lastname@example.org:osmlab/name-suggestion-index.git
cdinto the project folder,
npm installto install libraries
About the index
Generated files (do not edit):
Preset files (used by OSM editors):
dist/name-suggestions.json- Name suggestion presets
dist/name-suggestions.min.json- Name suggestion presets, minified
dist/name-suggestions.presets.xml- Name suggestion presets, as JOSM-style preset XML
dist/names_all.json- all the frequent names and tags collected from OpenStreetMap
dist/names_discard.json- subset of
names_allwe are discarding
dist/names_keep.json- subset of
names_allwe are keeping
dist/wikidata.json- cached brand data retrieved from Wikidata
Configuration files (edit these):
config/filters.json- Regular expressions used to filter
brands/*- Config files for each kind of branded business, organized by OpenStreetMap tag
Building the index
npm run build
- Any new entries from
names_keepnot already present in the index will be added to it
- Outputs many warnings to suggest updates to
npm run wikidata- Fetch useful data from Wikidata - labels, descriptions, logos, etc.
npm run docs- Updates the index summary pages
npm run- Lists other available tools
dist/names_all.json from planet
This takes a long time and a lot of disk space. It can be done occasionally by project maintainers. You do not need to do these steps in order to contribute to the index.
osmiumcommandline tool and node package globally (may only work on some environments)
apt-get install osmium-toolor
brew install osmium-toolor similar
npm install -g osmium
- Download the planet
curl -o planet-latest.osm.pbf https://planet.openstreetmap.org/pbf/planet-latest.osm.pbf
- Prefilter the planet file to only include named items with keys we are looking for:
osmium tags-filter planet-latest.osm.pbf -R name -o named.osm.pbf
osmium tags-filter named.osm.pbf -R amenity,shop,leisure,tourism -o wanted.osm.pbf
node build_all_names wanted.osm.pbf
- results will go in
git add dist/names_all.json && git commit -m 'Updated dist/names_all.json'
- results will go in