Canonical common brand names for OpenStreetMap
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.
Watch the video from our talk at State of the Map US 2019 to learn more about this project!
You can browse the index at https://nsi.guide/ to see which brands are missing Wikidata links, or have incomplete Wikipedia pages.
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 amenity=fast_food
but we see many examples of other spellings (Mc Donald's
, McDonalds
, McDonald’s
) and
taggings (amenity=restaurant
).
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)
- Vespucci
- JOSM presets available
- Osmose
- Go Map!!, as they use iD presets
- 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 bhousel
on:
- OpenStreetMap US Slack
(
#poi
or#general
channels)
- Clone this project, for example:
git clone [email protected]:osmlab/name-suggestion-index.git
cd
into the project folder,- Run
npm install
to install libraries
Preset files (used by OSM editors):
dist/name-suggestions.json
- Name suggestion presetsdist/name-suggestions.min.json
- Name suggestion presets, minifieddist/name-suggestions.presets.xml
- Name suggestion presets, as JOSM-style preset XML
Name lists:
dist/collected/*
- all the frequent names and tags collected from OpenStreetMapdist/filtered/*
- subset of names and tags that we are keeping or discardingdist/wikidata.json
- cached data retrieved from Wikidata
config/*
config/brand_filters.json
- Regular expressions used to filternames_all
intonames_keep
/names_discard
data/*
- Data files for each kind of branded business, organized by topic and OpenStreetMap tagdata/brands/amenity/*.json
data/brands/leisure/*.json
data/brands/shop/*.json
- and so on...
features/*
- Source files for custom locations where brands are active
👉 See CONTRIBUTING.md for info about how to contribute to this index.
npm run build
- Processes any custom locations under
features/**/*.geojson
- Regenerates
dist/filtered/names_keep.json
anddist/filtered/names_discard.json
- Any new items from
names_keep
not already present in the index will be added to it - Outputs many warnings to suggest updates to
data/**/*.json
- Processes any custom locations under
npm run wikidata
- Fetch useful data from Wikidata - labels, descriptions, logos, etc.npm run dist
- Rebuild and minify the generated files in thedist/
folder.npm run
- Lists other available commands
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.
- Install
osmium
commandline tool and node package (may only be available on some environments)apt-get install osmium-tool
orbrew install osmium-tool
or similarnpm install --no-save osmium
- Download the planet
curl -L -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,brand,operator,network -o named.osm.pbf
- Run
node collect_all.js wanted.osm.pbf
- results will go in
dist/collected/*.json
git add dist/collected && git commit -m 'Updated dist/collected'
- results will go in
name-suggestion-index is available under the 3-Clause BSD License. See the LICENSE.md file for more details.