OpenStreetMap element ID
ID osm_id
DatatypeNot PIIidentifierDraft
This record is a draft: it has not been reviewed yet and may be incomplete or wrong. Do not rely on it for compliance decisions. Help improve it (see CONTRIBUTING.md).
Identifier of an OpenStreetMap element, that is a node, a way or a relation. IDs are positive 64-bit integers that are unique only within one element type, so node 100 and way 100 are different objects. Datasets write the ID as a bare number, with a type letter (n, w or r; N, W or R in Nominatim), or as type/number like in OpenStreetMap URLs. osm2pgsql stores relation IDs as negative numbers.
- Categories
- Geographic identifiers
- Countries
- Global (not tied to a country)
- Languages
- Common to most languages
- Quality
- 80/100 · missing: mapping (Wikidata, Schema.org, ...), detector coverage
- Metacrafter rules
- no detection rule yet
- Supported by tools
- no tool record lists this type yet
Regular expression
^(?:-|[nwrNWR]|(?:node|way|relation)/)?[1-9][0-9]{0,18}$
Python re syntax.
Examples
| Value | Description |
|---|---|
| 62422 | Berlin boundary relation, bare number |
| n164979149 | Mount Everest summit node, osmium type letter |
| w32965412 | Statue of Liberty way, osmium type letter |
| R62422 | Berlin boundary relation, Nominatim lookup form |
| relation/51701 | Switzerland boundary relation, OpenStreetMap URL form |
| -62422 | Berlin boundary relation as osm2pgsql stores it |
| 0 invalid | IDs start at 1 |
| x62422 invalid | unknown element type letter |
Child datatypes
| ID | Name | Categories | Countries | Description |
|---|---|---|---|---|
| osm_node_id | OpenStreetMap node ID draft | geo | global | Numeric ID of an OpenStreetMap node, a single point with a latitude and a longitude. Nodes mark points of interest and are the vertices of ways. |
| osm_relation_id | OpenStreetMap relation ID draft | geo | global | Numeric ID of an OpenStreetMap relation, a group of nodes, ways and other relations with roles. Relations model administrative... |
| osm_way_id | OpenStreetMap way ID draft | geo | global | Numeric ID of an OpenStreetMap way, an ordered list of nodes that forms a line such as a road, or a closed shape such as a building outline. |
Translations
| Language | Name | Description |
|---|---|---|
| French | Identifiant d'objet OpenStreetMap | |
| Russian | Идентификатор объекта OpenStreetMap |
Sources
- doc: https://wiki.openstreetmap.org/wiki/Elements
- doc: https://nominatim.org/release-docs/latest/api/Lookup/
- doc: https://docs.osmcode.org/osmium/latest/osmium-getid.html
Use this record
- Page URL:
http://registry.apicrafter.io/datatype/osm_id - JSON: API v1 · legacy shape (used by metacrafter) · Markdown (for LLMs)
- Improve it: edit
data/datatypes/any/geo/osm_id.yamlon GitHub