Giter VIP home page Giter VIP logo

name-suggestion-index's Introduction

npm version

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.

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.

name-suggestion-index in use in iD

The name-suggestion-index is in use in iD when adding a new item

Currently used in:

  • iD (see above)
  • Vespucci
  • JOSM presets available

Prerequisites

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

Installing

  • 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

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/allNames.json - all the frequent names and tags collected from OpenStreetMap
  • dist/discardNames.json - discarded subset of allNames
  • dist/keepNames.json - kept subset of allNames

Configuration files (edit these):

  • config/filters.json- Regular expressions used to filter allNames into keepNames / discardNames
  • config/canonical.json - The main config file containing all the most correct names and tags to assign to them

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

Building the index

  • npm run build
    • Regenerates dist/keepNames.json and dist/discardNames.json
    • Any new keepNames not already present in config/canonical.json will be added to it
    • Outputs warnings to suggest updates to config/canonical.json

Updating dist/allNames.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
    • apt-get install osmium-tool or brew install osmium-tool or similar
  • 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,man_made,tourism -o wanted.osm.pbf
  • Run node build_allNames wanted.osm.pbf
    • results will go in dist/allNames.json
    • git add dist/allNames.json && git commit -m 'Updated dist/allNames.json'

License

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

name-suggestion-index's People

Contributors

bhousel avatar aaronlidman avatar matkoniecz avatar matthijsmelissen avatar simonpoole avatar jfirebaugh avatar maxerickson avatar skorasaurus avatar tyrasd avatar sb12 avatar naoliv avatar nakaner avatar sommerluk avatar brianegge avatar danstowell avatar hubminer avatar ricoelectrico avatar higa4 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.