Plotting path made by vessel from file with position, speed, heading and course over ground


I have CSV files from boats that have, timestamps, lat, and lon coordinates, heading, speed, and course over ground. I want to find a way to embed this into OpenStreetMap which will have the position of the vessel at each second while taking into account the heading and cog but I do know how to proceed. Could anyone enlighten me, please?


I am not sure what you mean by “embed this into OpenStreetMap”.

If you visually want to show the course of a ship overlaid on a map there are a number of web sites that could do that. The ones I know are land based but will probably work for over water too. One is GPS Visualizer. If you want to make a video of it you can use GpxAnimator. Both of those use GPX files which is a XML representation of the information you say you have in a CSV file. I haven’t looked around for one but I am sure you can find a CSV->GPX conversion tool.

Many thanks for your answer. Yeah, what you are describing is what I basically want to do.
I can convert the CSV into gpx using a Python script so no issue with that.
But what I want to do is to add some visualization to the map as making the sea red, or making the marker of the current position take another color when approaching some positions for example.

Do you know of any way to do this?


Both GPS Visualizer and GpxAnimator access and use standard slippery map tiles. I am not aware of a renderer that allows you to customize colors so I don’t know of a way you could have, for example, the sea colored red.

There might be an option on GpxAnimator for changing the marker icon when approaching a position. My copy of the app is a little older and I am not aware of it. On the other hand, a few years ago when I had some improvements and fixes for the team at GpxAnimator they quickly implemented them so they might be open to a suggested change.

OpenStreetMap is basically a big pile of data. People have used that data to create maps from. There are lots of these, including the six or so that you can see at

What it sounds like you are trying to do is to display what people often describe as a “GPS trace” over the top of a map created with OSM data. I’d start by looking at LeafletJS, the JavaScript library that the OSM website uses to display things. You can display raster tiles as a background (just like the OSM website does) and you can also draw whatever you like on top of that. There are lots of examples on the tutorials page.

Getting a devices current location is also possible from JavaScript, and you can use that to display something on top of a map too.

1 Like

Thank you very much, I think I will investigate that