What is OSM? #
The OSM is OpenStreetMap which creates and distributes free geographic data for the world.
Elements #
Elements are the basic components of OSMβs conceptual data model of the physical world. There are three types of elements:
- nodes (defining points in space)
- ways (defining linear features and area boundaries)
- relations (defining how other elements work together)
A Type Of Element: Node #
A node represents a specific point on the earthβs surface defined by its latitude and longitude. Each node comprises at least (1)an id number and (2)a pair of coordinates.
Nodes
- can be used to define standalone point features.
- are used to define the shape of a way. A node
- can be included as a member of a relation.
A Type Of Element: Way #
A way is an oredred list of between 1 and 2,000 nodes.
Ways
- are used to represent linear features such as rivers and roads.
- can represent the boundaries of areas such as buildings or forests.
- In this case, the wayβs first and last node will be the same. This is called a βclosed wayβ.
- Note that βclosed waysβ occasionally represent loops, such as roundabouts on highways, rather than solid areas. This is usually inferred from tags on the way. β¨However, some real-life objects can have both (1)a linear or an areal representation, and (2)the tag which can be used to avoid ambiguity or misinterpretation.
A Type Of Element: Relation #
A relation is a multi-purpose data structure that documents a relationship between two or more data elements(nodes, ways, relations).
Examples include:
- A route relation, which lists the ways that form a major highway, a cycle route, or a bus route.
- A turn restriction that says you canβt turn from one way into another way.
- A multipolygon that describes an area(whose boundary is the βouter wayβ) with holes(the βinner waysβ).
The relation
- is an ordered list of nodes, ways, other relations.
- βs meaning is defined by its tags. A relation must have at least the βtypeβ tag.
Tag #
All types of data elements(nodes, ways, relations), as well as changesets, can have tags. Tags describe the meaning of the particular element to which they are attached.
A tag consists of two free-format text fields; a βkeyβ and a βvalueβ.