From OpenStreetMap Wiki
Jump to navigation Jump to search


Help (89606) - The Noun Project.svg

Osm element node.svg





Nodes can be used on their own to define point features. When used in this way, a node will normally have at least one tag to define its purpose. Nodes may have multiple tags and/or be part of a relation. For example, a telephone box may be tagged simply with amenity=telephone, or could also be tagged with operator=*.



Many nodes form part of one or more ways, defining the shape or "path" of the way.

Where ways intersect at the same altitude, the two ways must share a node (for example, a road junction). If highways or railways cross at different heights without connecting they should not share a node (e.g. highway intersection with a bridge=*). Where ways cross at different heights they should be tagged with different layer=* or level=* values, or be tagged with location=* 'overground' or 'underground'. There are some exceptions to this rule, roads across dams are by current definition required to share a node with the waterway crossing the dam.

Some nodes along a way may have tags. For example:


有关此主题的更多详细信息、请参阅 Rails port/Database schema#Nodes
名称 描述
id 64-bit integer number
≥ 1
Node ids are unique between nodes. (However, a way or a relation can have the same id number as a node.) Editors may temporarily save node ids as negative to denote ids that haven't yet been saved to the server. Node ids on the server are persistent, meaning that the assigned id of an existing node will remain unchanged each time data are added or corrected. Deleted node ids must not be reused, unless a former node is now undeleted.
lat decimal number
≥ −90.0000000 and ≤ 90.0000000
with 7 decimal places
Latitude coordinate in degrees (North of equator is positive) using the standard WGS84 projection. Some applications may not accept latitudes above/below ±85 degrees for some projections. Do not use IEEE 32-bit floating point data type since it is limited to about 5 decimal places for the highest longitude.
A 32-bit method used by the Rails port is to use an integer (by multiplying each coordinate in degrees by 1E7 and rounding it: this allows to cover all absolute signed coordinates in ±214.7483647 degrees, or a maximum difference of 429.4967295 degrees, a bit more than what is needed).
For computing projections, IEEE 64 bit floating points are needed for intermediate results.
The 7 rounded decimal places for coordinates in degrees define the worst error of longitude to a maximum of ±5.56595 millimeters on the Earth equator, i.e. it allows building maps with centimetric precision. With only 5 decimal places, the precision of map data would be only metric, causing severe changes of shapes for important objects like buildings, or many zigzags or angular artefacts on roads.
lon decimal number
≥ −180.0000000 and ≤ 180.0000000
with 7 decimal places
Longitude coordinate in degrees (East of Greenwich is positive) using the standard WGS84 projection. Note that the geographic poles will be exactly at latitude ±90 degrees but in that case the longitude will be set to an arbitrary value within this range.
tags A set of key/value pairs, with unique key See Map Features for tagging guidelines.


<node id="25496583" lat="51.5173639" lon="-0.140043" version="1" changeset="203496" user="80n" uid="1238" visible="true" timestamp="2007-01-28T11:40:26Z">
    <tag k="highway" v="traffic_signals"/>