name-suggestion-index

Canonical common brand names for OpenStreetMap

Github星跟踪图

Build Status
npm version
Greenkeeper badge

name-suggestion-index

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.

Watch the video from our talk at State of the Map US 2019 to learn more about this project!

Browse the index

You can browse the index at https://nsi.guide/ to see which brands are missing Wikidata links, or have incomplete Wikipedia pages.

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 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:

Participate!

We're always looking for help! If you have any questions or want to reach out to a maintainer, ping bhousel on:

Prerequisites

  • Node.js version 10 or newer
  • git for your platform

Installing

  • Clone this project, for example:
    git clone git@github.com:osmlab/name-suggestion-index.git
  • cd into the project folder,
  • Run npm install to 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

Name lists:

  • dist/names_all.json - all the frequent names and tags collected from OpenStreetMap
  • dist/names_discard.json - subset of names_all we are discarding
  • dist/names_keep.json - subset of names_all we are keeping
  • dist/wikidata.json - cached brand data retrieved from Wikidata

Configuration files (edit these):

  • config/*
    • config/filters.json- Regular expressions used to filter names_all into names_keep / names_discard
  • brands/* - Config files for each kind of branded business, organized by OpenStreetMap tag
    • brands/amenity/*.json
    • brands/leisure/*.json
    • brands/shop/*.json
    • brands/tourism/*.json
    • brands/office/*.json

:point_right: See CONTRIBUTING.md for info about how to contribute to this index.

Building the index

  • npm run build
    • Regenerates dist/names_keep.json and dist/names_discard.json
    • Any new entries from names_keep not already present in the index will be added to it
    • Outputs many warnings to suggest updates to brands/**/*.json

Other commands

  • npm run wikidata - Fetch useful data from Wikidata - labels, descriptions, logos, etc.
  • npm run dist - Rebuild and minify the generated files in the dist/ folder.
  • npm run - Lists other available commands

Updating 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.

  • Install osmium commandline tool and node package (may only be available on some environments)
    • apt-get install osmium-tool or brew install osmium-tool or similar
    • npm 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 -o named.osm.pbf
    • osmium tags-filter named.osm.pbf -R amenity,shop,leisure,tourism,office -o wanted.osm.pbf
  • Run node build_all_names wanted.osm.pbf
    • results will go in dist/names_all.json
    • git add dist/names_all.json && git commit -m 'Updated dist/names_all.json'

License

name-suggestion-index is available under the 3-Clause BSD License.
See the LICENSE.md file for more details.

主要指标

概览
名称与所有者osmlab/name-suggestion-index
主编程语言JavaScript
编程语言JavaScript (语言数: 2)
平台
许可证BSD 3-Clause "New" or "Revised" License
所有者活动
创建于2013-10-23 19:22:26
推送于2025-04-25 10:28:07
最后一次提交2020-10-02 11:20:48
发布数225
最新版本名称v6.0.20250421 (发布于 )
第一版名称v0.1.2 (发布于 )
用户参与
星数757
关注者数40
派生数0.9k
提交数28.1k
已启用问题?
问题数4414
打开的问题数252
拉请求数5735
打开的拉请求数30
关闭的拉请求数682
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?