User:Moresby/Types of way
Ways are one of the basic elements of OpenStreetMap's data model, and comprise an ordered list of references to node elements. But the specific choice of nodes and their locations relative to each other produce several different types of way, which in turn can lead to different representations on the map. Two distinct aspects contribute to the analysis of the type of way: topological aspects, the choice and arrangement of the nodes in the way, and locational aspects, the specific coordinates of the nodes themselves.
The topological aspects of the way are those which are independent of the locations of the nodes. The simplest topological type of way is one in which no node occurs more than once.
As of 2 March 2014, 3,586,865 (51.0%) of the ways in the UK were of this type.
The next simplest type is the simple closed way: the first and last node are the same, and all other nodes are distinct from this, with no node, other than the first/last occurring more than once.
As of 2 March 2014, 3,416,118 (48.6%) of the ways in the UK were of this type.
Other way types are more complex. One type seen sometimes for mapping roads ending in a loop is a 'needle-shaped' way. Until the last node, no node occurs more than once. The last node is a duplicate of a previous node, but not the first, as this would be a simple closed way. Apart from the special case of the final node being the same as the penultimate one, this type, like the simple closed way, includes a bounded area. (The converse case also applies: all but the first node are distinct, and the first node duplicates one of these.)
As of 2 March 2014, 23,361 (0.3%) of the ways in the UK were of this type.