We're programming an app for Windows Phone 7, and we're using Open Street Map (OSM) as our data source. We're using this URI: http://api.openstreetmap.org/api/0.6/map?bbox=32.0846,034.8415,32.3846,035 and we're filling in coordinates according to the current position of the app's user. The data we receive is : "nodes", "way", and "relation". This is our question:
|
nodes carry the geographic coordinates in the OSM data model. A way only gets geometry via the nodes that are members of it. Most of the time such nodes will be untagged and only serve to determine the way geometry. See for example http://en.flossmanuals.net/openstreetmap/the-osm-data-model/ answered 27 Aug '13, 14:09 SimonPoole ♦ 1
Also have a look at the relevant page of the beginners' guide - that explains the sorts of data contained within OSM.
(27 Aug '13, 14:24)
SomeoneElse ♦
|
Any node can have tags. Nodes without tags are usually points that help define the geometry of a way (as the latitude and longitude are properties of the node). Some nodes in ways may have tags (such as highway=crossing) but many won't. Nodes that have no tags and aren't part of a way can just be ignored generally. This page might help. answered 27 Aug '13, 14:11 EdLoach ♦ 1
Nodes which have no tags and aren't part of a way could still be a member of a relation :).
(27 Aug '13, 14:16)
scai ♦
|
As the others told you, only the nodes have geographical coordinates. Ways are simply lists of nodes and their graphical representation is a line consisting of segments connecting consecutive nodes. Relations are groups of nodes or ways. A simple example of different tagging is a residential street with pedestrian crossing. The street would bear a highway=residential tag, while most of the nodes would have no tag at all. Only the node located in the place of the crossing would have a highway=crossing tag. Be aware that many features might be represented by different elements. For example a shop (e.g. shop=convenience) might be a single node or a polygon (a closed way) outlining the building. A simple road might be a way, but expect most of the highways to be a relation, grouping segments and junctions together. answered 27 Aug '13, 14:45 emes |
Not directly related to the question, but related to the fact that you're hitting the API directly - have you had a read of the API terms of use?