Multiple versions of OSM Nodes means inaccurate data.

Hi,

I’m new and I don’t understand how OSM works but I have downloaded some of its XML data which I find a little odd. For example the data contains details of a wreck. What concerns me is that the position of this “record” has been moved about over the years. 55N 6W to 58N 3W, these are not insignificant jumps and are not isolated to this one record. It could be that I am misreading the data but it seems to me that OSM can not be relied on if a ship scuttled in Scarpa Flow. For example version 4 appears to be in the hills just west of Loch Long.

So where is the wreck of SMS Karlsruhe and how is a user suppose to know based on this dataset alone?

best wishes

Skids

See https://www.openstreetmap.org/node/663869619
The other nodes in your extract are not related to this node.
The history of the node 663869619 is here:
https://www.openstreetmap.org/api/0.6/node/663869619/history

GerdP,

Thank you for your explanation which explains how I should be reading the data, i.e. a record is between the xml tags <node … /> . So does this mean that the other node records that have no OSM tags such as those listed above are part of “ways” or other group constructs ? I’m wondering how an application is best designed to parse the xml or do they generally use more efficient versions of the data?

best wishes

Simon

See https://wiki.openstreetmap.org/wiki/Elements

Depends on what you try to achive. For offline processing the pbf format is well established.
https://wiki.openstreetmap.org/wiki/PBF_Format

Typically you have an internal representation of the data needed in your application and one or more adapters to the OSM data formats/API.

How did you get the data that you downloaded? One of your nodes, https://www.openstreetmap.org/node/663812313 , is just on a road in Scotland.

I would like to be able to create an OpenStreetMap / OpenSeaMap file that will load onto my Garmin GPS. I have downloaded an area from OpenSeaMap but rocks and wrecks are not shown and neither are contours of the hills So my aim is a UK map that shows both contours and marine hazards and that loads onto a Garmin GPS.

The data above was downloaded from here http://download.geofabrik.de/europe/great-britain/scotland.html. The 320Mbyte download for Scotland decompresses to 3.2 Gbyte of xml so reading the data is a challenge.

I’m creating a tool to extract certain nodes based on their tags and then convert them into Garmin POIs. I believe that JOSM can do this but it appears to choke on the xml data or I have not waited long enough for it to process the file. The solution may be to first exclude nodes that fall outside a geographic area. So far my application is failing as it is including all the spurious nodes as shown in the data above. However, this should be a simple fix.

Or you could just use osmfilter?

To get something loaded onto a Garmin device you’ve got a few options. The main two are:

  1. Create a map that you can load on the device, typically using mkgmap - perhaps using an import file that you’ve filtered using e.g. osmfilter

  2. Create a GPX file containing just rocks and wrecks that you can display over the top of whatever other maps you have on your device. Whether this is a suitable option for you likely depends on how much you want to show and what Garmin device you have (ddifferet ones support different numbers of waypoints).

Lots of information about how to do (1) exists in various places, such as the OSM wiki and mkgmap’s own documentation. I also wrote https://www.openstreetmap.org/user/SomeoneElse/diary/38613 ages ago and would expect that to be still mostly accurate.

If (2) is an option for you it is probably easier, although you won’t just be able to download data from OSM and throw it at a Garmin, due to Garmin’s restrictions of what it can usefully do with data in GPX files. I wrote https://github.com/SomeoneElseOSM/Notes01 a while back to extract data of interest from OSM in a small area from OSM and trim it so that a Garmin can understand it. Looking at that might help you understand what you need to do if you want to follow that route. “Notes01” is written in Java, but I know that other people have solved the same problem in different ways (again look in the OSM wiki) if you’re allergic to Java.

Thanks for both of your suggestions: Richard I will research osmfilter. SomeoneElse, I will follow your links with interest.

The data reduction has prompted a useful discussion on a programming site with my initial 27 minutes to parse the 3.2 Gbyte Scotland file being reduced to forty seconds.

best wishes

SomeoneElse : Thank you for such an excellent tutorial at option 1 above. I have followed it and created a map that installed on my old etrex gps without any problems. I’m still trying to get the nodes tagged seamark:rock to display and had a look in the default style file for points but don’t see seamarks mentioned anywhere so I’m not sure how the lights and some buoys are displayed on the final map while rocks are not. Could it be a case of the garmin not having the correct icon to display?

Anyhow my experiments are on going.

S

Maybe look at the marine style. There is some hard coded support for tags with the seamark: prefix in mkgmap. I never tried to understand it.

Thanks for the hint.