Reputation: 1449
The .osm file I have:
// Weird part of the file
<node id="104511" lat="52.1696253" lon="0.131889"
version="3" timestamp="2013-03-05T18:51:38Z"
changeset="15262147" uid="103253" user="gormur"
/>
contains nodes that apart from latitude and longitude have no other meaningful info (in my opinion). I have no idea whether such node is a building, a bus stop, or an intersection of two streets.
1) Why do people add such nodes into the file?
2) What's a simple way to remove such nodes from .OSM and leave file only with tagged nodes, such as:
<node id="104520" lat="52.1951248" lon="0.1312155" ...>
<tag k="highway" v="traffic_signals"/>
</node>
3) Could an untagged node indicate the intersection of 2 streets? Will I realize which streets the node intersects by looking to which ways it belongs? How can I know such node is the intersection of 2 streets rather than a building on the corner of 2 streets?
Upvotes: 0
Views: 212
Reputation: 21479
Not all nodes have/need tags.
Nodes that are part of a way (a street, a building, a forest etc.) just exist to define the geometry of that way. In that case all the necessary tags (highway, building, landuse and so on) are on the corresponding way and not on the node. A way keeps a reference to all nodes it consists of. So in order to know if a node is part of a building you have to take a look at the way it belongs to (if it belongs to a way). Also note that a node can belong to multiple ways, or to no way at all.
It depends on the specific feature if the tags are primarily used on nodes, ways or relations. Buildings for example are mostly mapped as ways, sometimes as relations and rarely as nodes. Contrary, bus stops are mostly just nodes.
For more information take a look at the OSM XML file format, OSM elements and OSM tags.
Upvotes: 2