Changes between Version 24 and Version 117 of Help/Concepts/Object


Ignore:
Timestamp:
(multiple changes)
Author:
(multiple changes)
Comment:
(multiple changes)

Legend:

Unmodified
Added
Removed
Modified
  • Help/Concepts/Object

    v24 v117  
    1 [[TranslatedPages]]
     1[[TranslatedPages(outdated=Member; Membership; Roles; Child and Parent not explained properly. Any need to split Tags into two parts ?)]]
    22
    3 = Objects - The basic building blocks of OSM data and maps =
    43
    5 JOSM helps you to enter data about real-world objects in the OSM geo-database. Despite the overwhelming complexity of real-world objects you can map, JOSM provides only three kinds of objects as basic building blocks for maps: [[Image(source:trunk/images/data/node.png,top)]] **[#Nodes nodes]**, [[Image(source:trunk/images/data/way.png,middle)]] **[#Ways ways]** and [[Image(source:trunk/images/data/relation.png,middle)]] **[#Relations relations]**.
     4= Objects - The basic building blocks of OpenStreetMap data and maps =
    65
    7 You can assign **[#Tags tags]** to objects. It's the assigned set of tags which makes a node representing a restaurant different from a node representing a church, or a way representing a residential road different from a ways representing a river, or a relation representing a bus route different from a relation representing a cycling route.
     6Please don't hurry reading this, you can consult this page again at any second.
    87
    9 [[TOC(inline)]]
     8[[PageOutline(2-10,Table of Contents)]]
     9
    1010
    1111== Nodes, ways, and relations == #NodesWaysRelations
    12 === Nodes ===
    13 [[Image(source:trunk/images/data/node.png,20,bottom,margin-right=15)]] A **node** is an individual point with a defined position.
    1412
    15 === Ways ===
    16 [[Image(source:trunk/images/data/way.png,20,middle,margin-right=15,margin-bottom=5)]] A **way** is a sequence of nodes. Despite its name a way doesn't represent ways in the real-world only. An OSM **way** is also used to represent a river, the boundaries of a country, or even a building.
     13=== Tags (also an OSM data primitive) === #Tags
    1714
    18 ==== Closed Ways (Areas) ==== #ClosedWays
    19 [[Image(source:trunk/images/data/closedway.png,20,middle,margin-right=15,margin-bottom=5)]] If a **way** is closed, i.e. if the last node is the same as  the first node, it is also called an **area**.
     15Tags provide meaning to the objects. Without them, any other object would be useless and meaningless. Each of ''three other data primitives'' **can have multiple tags**.
    2016
    21 === Relations ===
    22 [[Image(source:trunk/images/data/relation.png,20,middle,margin-right=15,margin-bottom=5)]] A **relation** is an sequence of other objects, for instance a sequence of ways (representing road segments) and nodes (representing bus stops) which represent a bus route. Each object participating in a **relation** can be assigned a **role**, for instance `stop` for a bus stop in the bus route, or `platform` for platforms related to according stop positions.
     17[=#presets Often tags used in combinations; **usually these combinations can be found] in [wikitr:/Presets presets]**. But it may be true that tags you need to use are not in presets and you need to know them first.
    2318
    24 == Tags ==
    25 A **tag** is a name/value pair assigned to an object. Tags are used to describe an object in detail. If we write `foo`=`bar` we mean ''The tag with key foo is assigned the value bar''. Here are some examples:
     19Simplest example is [osmwiki:Key:drinking_water drinking_water=yes] - it is present globally and can be applied to every object that provides water. Other example is [osmwiki:Key:leaf_cycle leaf_cycle]=* of trees, it will have less coverage globally (as trees do not grow just everywhere).
     20
     21From time to time you will encounter [osmwiki:Named_spots_instead_of_street_names tags that found somewhere else but not in your locality]; it is good idea to check wiki what is tag about, use: [osmwiki:Essential_links_tagging Essential links tagging] as starting point.
     22
     23[#Tags1 We will cover tags in more detail below], but first will cover all other data primitives.
     24
     25=== Nodes (also an OSM data primitive) === #Nodes
     26[[JOSMImage(data/node,24,bottom,margin-right=15,link=)]] A **node** is an individual point with a defined position. ''With respective tags'' it can be used to indicate shops, benches, individual trees or points of drinking water.
     27
     28Only nodes have [wikitr:/Help/Concepts/Coordinates Coordinates] in the OSM data model. Ways and relations simply refer to nodes.
     29
     30==== Common nodes ====
     31
     32Nodes can be re-used between multiple ways. Multiple ways can refer to a single node (common node).
     33
     34A practical meaning of this is demonstrated at the [wikitr:/Help/Action/Draw#Commonnodes Draw Nodes] page. The [wikitr:/Help/Action/MergeNodes Merge Nodes] tool can be used to create common nodes.
     35
     36=== Ways (also an OSM data primitive) === #Ways
     37[[JOSMImage(data/way,24,middle,margin-right=15,margin-bottom=5,link=)]] A **way** is a sequence of nodes ([https://en.wikipedia.org/wiki/Polygonal_chain a "polygonal chain" from ordinary geometry]). OSM **way** used to represent linear objects, ''with respective tags'' it can used to describe: a river bank, tree row, kerbs in the streets (among other uses).
     38
     39==== Direction ====
     40Since nodes are ordered in OSM; every way in OSM has a direction. This gives us possibility to add tags (details about object) such as [osmwiki:Key:conveying conveying=*] - to specify direction of escalators and moving walkways or [osmwiki:Key:incline incline=*] which can be used toghter with roads and footways. There [osmwiki:Category:Way_Direction_Dependent more examples] and we can't cover them all.
     41
     42**Note**: Rendering of direction in [wikitr:/Help/MapView MapView] can be set in Preferences under [wikitr:/Help/Preferences/DrawingPreference OSM Data].
     43
     44==== Segment ====#Segment
     45Is **a fragment between two consequent points of the way** ([https://en.wikipedia.org/wiki/Line_segment "line segment" from ordinary geometry]). This is not a part of OSM data model, but users often distinguish because of tools than operate on segment level (rather than on complete way); please, distinguish a segment(s) from complete "way"s.
     46
     47**Note**: Rendering of segments in [wikitr:/Help/MapView MapView] can be set in Preferences under [wikitr:/Help/Preferences/DrawingPreference OSM Data].
     48
     49==== Areas ==== #Areas
     50[[JOSMImage(data/closedway,24,middle,margin-right=15,margin-bottom=5,link=)]] If a **way** is closed, i.e. if the last node is the same as  the first node, it is also called an **area**. Old term for this is ''Closed Ways'' (it is still present at wiki, used in software and by some mappers; other part uses "geometry" when talking just about shape of the objects, without tags).
     51
     52Sometimes single area is not enough to represent an object (for example, a lake with an island in it), then you have to use a [wikitr:/Help/Concepts/Object#typemultipolygon multi-polygon]
     53
     54=== Relations (also an OSM data primitive) === #Relations
     55
     56==== In most cases you don't need them ====
     57If some object can be represented with single ''node'' or ''way'' and ''multiple tags supported by software'', then there is no need in relations. But there are some rare cases where it is theoretically and practically impossible ''only with nodes, ways and tags'' (ex. turn restrictions, will be covered below).
     58
     59This means **you can [#Tags1 skip this big "Relations" section], until you decide to add or edit a relation**.
     60
     61==== Simple explanation ====#SimpleExplanation
     62[[JOSMImage(data/relation,24,middle,margin-right=15,margin-bottom=5,link=)]]  A **relation**:
     63* is a sequence of other objects (nodes, ways and relations)
     64* as other objects (node, way) - every relation can have their own "tags"
     65* can be used as members in other relations (nested or hierarchical structures)
     66* tag type=* used to define one of [osmwiki:Types_of_relation many types of relations]
     67
     68Additionally, each object participating in a **relation** can be assigned a **role**, for instance "via" node and "from", "to" ways in type=restriction relation.
     69
     70[wikitr:/Help/Relations Relation Help] covers the most basic tools to create relations in JOSM ([wikitr:/Help/Dialog/RelationList Relations window], [wikitr:/Help/Dialog/SelectionList Selection], [wikitr:/Help/Dialog/RelationEditor Relation editor]).
     71
     72==== Most popular types ====
     73
     74===== type=multipolygon =====#typemultipolygon
     75
     76A water object ({{{natural=water}}}), a building ({{{building=*}}}) or administrative boundary ({{{admin_level=*}}} tag) usually consist of the  multiple spatially separated parts belonging to the one object. More importantly, each of these parts can have exclusions ([https://en.wikipedia.org/wiki/Enclave_and_exclave enclaves/exclave] or simply islands or swamps in the water basins).
     77
     78* Parts are created using "{{{outer}}}" role. ''Each multi-polygon should have at least one outer part''.
     79* Holes inside parts - using "{{{inner}}}" role. ''Each part can have from 0 to N holes''.
     80* Ways that form a ring where all ways are connected between each other using common nodes (JOSM will warn you about mistakes during validation)
     81* Rarely, holes can be nested. If nesting is more complex than ''single outer'' and ''single inner ring'', role swapping can continue: outer-inner-outer-inner-...
     82* Outer and inner rings shouldn't have common nodes (but validator will warn you about this and other mistakes)
     83
     84Multi-polygon specific tools:
     85* [wikitr:/Help/Action/CreateMultipolygon create a multipolygon]
     86* [wikitr:/Help/Action/UpdateMultipolygon update existing multipolygon]
     87
     88===== type=route =====
     89
     90[osmwiki:Relation:route Route-Relation] describe common routes for all kind of transport modes and transportation services like [osmwiki:Tag:route=road roads], [osmwiki:Tag:route=bicycle bicycle], [osmwiki:Tag:route=hiking hiking], [osmwiki:Public_transport public_transport] or even electric [osmwiki:Tag:route=power power lines]
     91
     92===== type=restriction =====
     93
     94Can be used to describe turn restrictions according to signs and road marking. JOSM has a plugin to support this type of relations: [osmwiki:JOSM/Plugins/Turnrestrictions Turnrestrictions plugin],[osmwiki:Relation:restriction#Examples Examples]
     95
     96
     97== Tags ==#Tags1
     98More precisely, a **tag** is a name/value pair assigned to an object. If we write `foo`=`bar` we mean ''The tag with key foo is assigned the value bar''. Here are some examples:
    2699* `name`=`Main road` assigned to a way. This tag indicates that the name of the way is `Main road`.
    27 * `amenity`=`restaurant` assigned to a node. This tag indicates that the node represents a restaurant in the real-world.
     100* `natural`=`tree` assigned to a node. This tag indicates that the node represents a tree in the real-world.
    28101* `route`=`bus` assigned to a relation. This tag indicates that the relation represents a bus route.
    29102
     
    31104
    32105{{{
    33 highway=living_street
     106highway=residential
    34107name=Main road
    35108name:en=Main road
    36 name:de=Hauptstrasse
     109name:de=Hauptstraße
    37110maxspeed=30
    38111hgv=no
     
    40113}}}
    41114
    42 Assigned to a way, this set of **tags** indicate, that the way represents a living street with name ''Main road'' (the German name be ''Hauptstrasse'', the English name, which in this example equals to name, is ''Main road''). Speed is limited to 30km/h and heavy goods vehicles (hgv) are not allowed. Furthermore, it's a one way street.
     115Assigned to a way, this set of **tags** indicate, that the way represents a road in a residential area with name ''Main road'' (the German name be ''Hauptstraße'', the English name, which in this example equals to name, is ''Main road''). Speed is limited to 30km/h and heavy goods vehicles (hgv) are not allowed. Furthermore, it's a one way street.
    43116
    44 You are free to assign an object whatever tag you feel necessary. However, there is a list of so called [osmwiki:Map_Features Map Features], i.e. a canonical list of **tags** with a well-defined meaning which are often used by mappers. Whenever possible you are advised to stick to these tags because map renderers, routing engines, and other pieces of software rely on them.
     117In the [[JOSMImage(dialogs/propertiesdialog)]] [wikitr:/Help/Dialog/TagsMembership Tags/Membership panel] you can assign tags to an object, remove tags from an object, or edit assigned tags.
    45118
    46 In the [[Image(source:trunk/images/dialogs/propertiesdialog.png,18,middle)]] [Dialog/TagsMembership Tags/Membership Dialog] you can assign tags to an object, remove tags from an object, or edit assigned tags.
    47119
    48 == Object ids ==
    49 The OSM server assigns each object a unique number, the **object ID** or **OSM ID**. A new object doesn't have an ID (it's ID is 0) until it is uploaded the first time to the OSM server.
    50 * Under **''Preferences -> [[Image(source:trunk/images/preferences/display.png,18,middle)]] [Preferences/Display Display Settings] -> Look and Feel''** it is possible to en- or disable the display of objects ids in the toggle dialogs.
    51 * With **''File -> [[Image(source:trunk/images/downloadprimitive.png,18,bottom)]] [Action/DownloadObject Download object ...]''** it is possible to download **objects** by Ids.
    52 * **''View -> [[Image(source:trunk/images/about.png,18,bottom)]] [Action/InfoAboutElements Advanced info]''** opens separated windows with informations about selected objects in text format.
    53 * **''View -> [[Image(source:trunk/images/about.png,18,bottom)]] [Action/InfoAboutElementsWeb Advanced info (web)]''** opens the **objects' pages** of selected objects on the [osm: OSM website] in your web browser.
     120== Technical properties ==
     121
     122=== Object id ===#ObjectId
     123The OSM server assigns each object a unique number, the **object ID** or **OSM ID**.
     124
     125In JOSM, a new object doesn't have an ID (its ID is 0) until it is uploaded the first time to the OSM server.
     126* Under **''[[JOSMImage(preference)]] [wikitr:/Help/Action/Preferences Preferences]''** (or **''`F12`''**) -> [[JOSMImage(preferences/display,24,link=,middle)]] **''[wikitr:/Help/Preferences/Display Display]''** it is possible to en- or disable the display of objects ids in the windows.
     127* With **''File -> [[JOSMImage(downloadprimitive)]] [wikitr:/Help/Action/DownloadObject Download object ...]''** it is possible to download **objects** by Ids.
     128
     129**Note**: The display of object ids in the [wikitr:/Help/Dialog/SelectionList Selection List] can be set in Preferences under **''[wikitr:/Help/Preferences/Display Display]''**.
     130
     131
     132=== Object versions and history ===#Objectversionsandhistory
     133Version numbers (versions) were introduced to simplify wiki-style editing. Unfortunately, to track changes to ways/relations you need to use more complex tools than simple comparison by version number.
     134
     135* Contents of the relation can change without change in version or id of the relation (a way can be changed, a node can be changed, a child relation can be changed).
     136* Contents of the way can change without change in version or id of the way (a child node can be moved back and forth several times, but id of the way may stay the same).
     137
     138But you can always track complete history of one node based on history.
     139Also, you can use time sliced data (region extracts by date) to inspect how objects were changing (and refer to object id and point in time from the database).
     140
     141**Note**: The display of object versions in the [wikitr:/Help/Dialog/SelectionList Selection List] can be set in Preferences under [wikitr:/Help/Preferences/Display Display].
     142
     143==== Information about latest version ====
     144* **''View -> [[JOSMImage(info)]] [wikitr:/Help/Action/InfoAboutElements Advanced info]''** (or Keyboard shortcut:**''`Ctrl+I`''**) opens separated windows with informations about selected objects in text format.
     145* **''View -> [[JOSMImage(info)]] [wikitr:/Help/Action/InfoAboutElementsWeb Advanced info (web)]''**  (or Keyboard shortcut:**''`Ctrl+Shift+I`''**) opens the **objects pages** of selected objects on the [osmwww: OSM website] in your web browser.
    54146
    55147Alternatively, you can browse the objects directly by entering following address in your web browser:
    56148
    57149{{{
    58 http://www.openstreetmap.org/browse/[node/way/relation]/[ID]
     150https://www.openstreetmap.org/browse/[node/way/relation]/[ID]
    59151}}}
    60152
    61 == Object versions ==
    62 Each object has a **version**. The **version** is incremented whenever the object is uploaded to the server and the OSM server not only stores the most recent version of an object, but it's complete **history**.
     153==== History of the object ====#ObjectHistory
     154Each object has a **version**. The **version** is incremented whenever the object is uploaded to the server and the OSM server not only stores the most recent version of an object, but its complete **history**.
    63155
    64 * **''View -> [[Image(source:trunk/images/about.png,18,bottom)]] [Action/ObjectHistory History]''** opens the [Dialog/History#Workingwiththehistorybrowser History Browser]. The History Browser will show you the **versions** of a particular object.
    65 * Alternatively, **''View -> [[Image(source:trunk/images/about.png,18,bottom)]] [Action/ObjectHistoryWeb History (web)]''** opens a page on the [https://www.openstreetmap.org OSM website] in your web browser which displays the object history, too.
    66 * In the [[Image(source:trunk/images/dialogs/history.png,18,bottom)]] [Dialog/History History Dialog] you can load the **history** of an object and launch the [Dialog/History#Workingwiththehistorybrowser History Browser].
     156* **''View -> [[JOSMImage(dialogs/history)]] [wikitr:/Help/Action/ObjectHistory History]''** (or Keyboard shortcut:**''`Ctrl+H`''**) opens the History Browser. The History Browser will show you the **versions** of a particular object.
     157* Alternatively, **''View -> [[JOSMImage(dialogs/history)]] [wikitr:/Help/Action/ObjectHistoryWeb History (web)]''** (or Keyboard shortcut:**''`Ctrl+Shift+H`''**) opens a page on the [osmwww: OSM website] in your web browser which displays the object history, too.
    67158
    68159----
    69 Back to [wiki:/Help Main Help]
     160Back to [wikitr:/Help Main Help]