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.
- Read up about how you can contribute to the iD Tagging Schema on the contributing page.
- Translate!
- See the open issues in the issue tracker if you're looking for something to do.
- Need more help? Ping user
tyr_asd(Martin Raifer) on OpenStreetMap Discord (#id-and-rapidchannel) or OpenStreetMap US Slack (#idchannel).
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
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.
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.
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.
See the dedicated CONTRIBUTING page for information about this.