Mirror id-tagging-schema
Find a file
Flo Edelmann 3aaac691d2
Some checks are pending
Interim Build / Build and Deploy Interim State (push) Waiting to run
Code Style Checks / Check file endings (push) Waiting to run
Code Style Checks / Check for code formatting mistakes (push) Waiting to run
Code Style Checks / Check for spelling errors (push) Waiting to run
Release Drafter / update_release_draft (push) Waiting to run
Build and Deploy Staging Instance / build-deploy (push) Waiting to run
Test / test (push) Waiting to run
Reuse building type translations (#3228)
2026-11-01 20:28:36 +01:00
.github Handle "geometry" label correctly in drafting release description (#3123) 2026-10-20 11:48:35 +02:00
.vscode run prettier via eslint (#2683) 2026-08-15 07:20:40 +02:00
data Reuse building type translations (#3228) 2026-11-01 20:28:36 +01:00
dist v7.3.0 2026-10-11 21:52:50 +02:00
schemas Refactor field groups in json schema (#3153) 2026-10-27 11:56:21 +01:00
scripts detect referencing nonexisting attribute (#3139) 2026-10-20 15:29:11 +02:00
.editorconfig format JSON schema files 2026-07-28 15:31:23 +02:00
.gitattributes make GitHub recognise that this repo contains mostly JSON, not JS (#1989) 2026-03-09 17:25:48 +01:00
.gitignore rename files, update docs, and update config for schema-builder merge 2026-07-09 19:45:41 +10:00
.nvmrc add .nvmrc file 2023-03-13 12:55:17 +01:00
.prettierignore Fix: cross-platform compatibility for npm run lint on Windows (#1969) 2026-03-03 11:46:18 +01:00
.prettierrc Update and run Prettier (#1144) 2024-02-28 09:15:22 +01:00
.travis.yml Add travis.yml 2020-11-25 14:57:24 -05:00
CHANGELOG.md v7.3.0 2026-10-11 21:52:50 +02:00
CONTRIBUTING.md Update CONTRIBUTING.md about wiki items and wiki links (#1600) 2026-10-03 08:14:21 +02:00
eslint.config.js simplify eslint config (#2747) 2026-08-22 13:54:59 +02:00
GOVERNANCE.md document NLnet funding in GOVERNANCE.md (European Union funding via NLnet for @matkoniecz) (#3025) 2026-10-02 15:06:30 +02:00
GUIDELINES.md Update GUIDELINES.md allowing non-US English in search terms (#2693) 2026-09-07 16:41:39 +02:00
ICONS.md Direct link for roentgen icons repository (#2489) 2026-07-14 11:56:50 +02:00
LICENSE.md Remove copyright year in LICENSE.md (#2111) 2026-03-31 12:39:25 +02:00
MIGRATION_GUIDE.md Allow to specify related vertex presets, and define such for power=line/minor_line and house presets (#2454) 2026-09-30 12:05:54 +02:00
netlify.toml Revert "Netlify preview: Add CORS for iD Staging deploy" (#2436) 2026-07-10 00:12:29 +02:00
package-lock.json Bump @types/node from 26.6.2 to 26.6.5 (#3237) 2026-11-01 10:29:36 +01:00
package.json Bump better-ajv-errors from 2.0.3 to 3.0.3 (#3240) 2026-11-01 09:21:58 +01:00
README.md Guide user how to obtain data and reaffirm that this data is machine-readable set of properties (#3095) 2026-10-21 11:25:56 +02:00
SCHEMA.md Asssorted phrasing improvements in SCHEMA.md documentation (#3143) 2026-10-27 12:17:38 +01:00
tsconfig.json remove shelljs dependency (#2706) 2026-08-15 06:09:26 +02:00
vitest.config.js rename files, update docs, and update config for schema-builder merge 2026-07-09 19:45:41 +10:00

test npm version

iD Tagging Schema

This is the directory of OpenStreetMap tagging data used by the iD editor and others. It includes presets, fields, deprecations, and more, recording various information about OpenStreetMap tagging, in a machine-readable format for easy use by editor software. It does this by abstracting and slightly simplifying OpenStreetMap's Folksonomy as documented on the OpenStreetMap Wiki, the community forum and other sources. The main goal is to allow OSM editing software to display the OSM data in a way that is intuitive and easy to understand for the user (i.e. such that they don't have to read the full documentation in order to use the respective tags). iD tagging schema is following community consensus rather than inventing new tagging methods.

Participate!

Background

OpenStreetMap itself does not have a formal rigid database schema, but relies on a tagging folksonomy instead.

Editing tools need to know how tags are used in order to facilitate mapping. This Tagging Schema fills that need, but with a number of caveats:

  • This isn't authoritative or definitive
  • Tagging interpretations may vary from mapper to mapper, place to place, and over time
  • Our primary aim is to serve the needs of iD mappers (but other tools are welcome to use this too)
  • We support tags based on practicality, usage, and community approval
  • Sometimes there are reasons we can't support a tag even if it's used or approved

Usage

Direct (e.g. via npm)

You can use npm install @openstreetmap/id-tagging-schema to obtain the most recently published data. Alternatively, you can also fetch it directly from the dist/ folder from tagged releases of this repository. See the schema file for documentation of structure of content published here.

Usage Example

A common scenario would be finding the name of a map feature type in a specific language, given raw tags of an OSM object. For example we may be looking for French label for an object tagged as amenity=vending_machine vending=flowers ref=178.

In this case going through dist/presets.json allows to find the best match for the object's tags. In this case it should be the preset with the identifier amenity/vending_machine/flowers, based on its tags definition:

    "tags": {
        "amenity": "vending_machine",
        "vending": "flowers"
    },

Then dist/translations/fr.json may be searched for the code amenity/vending_machine/flowers, getting us the fitting label.

Note that in production use we would be using the minified versions of these files - dist/presets.min.json and dist/translations/fr.min.json.

Also, in a real use other properties of presets should be also considered. Filtering by geometry type should be performed. Some presets are valid only in some parts of the world.

In many cases more than one preset will match. amenity=vending_machine from the example above matches far more presets. But there is only one match on two tags, so it should be considered as most fitting. matchScore may be defined on presets and taken into consideration when ordering them as secondary discriminator.

Kotlin Multiplatform

The westnordost/osmfeatures project, a component of StreetComplete, makes it easier to use this data with Android, iOS and Java platforms.

  • The OpenStreetMap wiki documents the current usage of tags, and hosts discussions about proposed new tags.
  • iD also incorporates preset data from the name-suggestion-index.
  • Other editors also include their own models of OSM tagging. See for example Vespucci's or JOSM's tagging presets.

Contributing

See the dedicated CONTRIBUTING page for information about this.