TransWikia.com

How do I convert a set of latitude/longitude coordinates with timestamps to a GPX tracklog?

Geographic Information Systems Asked on December 8, 2020

Converting tracks from a GPX track to a CSV table or some other format is relatively easy, but I’m looking to go the other way. I have a table of point locations logged with a handheld GPS, with timestamps. I need to convert them to a GPX file with a tracklog containing those points so they can be used with some other software to geotag some photos. I can convert them to GPX waypoints easily enough using QGIS/GDAL, but not to a GPX tracklog, the timestamps are lost.

Here’s the header of my CSV:

Lon,Lat,Altitude,NewTrack,TimeStamp,Datum,InternalTime

2 Answers

GPS Visualizer will pass your time stamps to gpx format.

Using the online tools will preserve your timestamp in the .csv file.

Convert a GPS file to plain text or GPX

This form reads a tracklog or waypoint file (in a recognized format) or plain-text tabular data, and converts it to an easy-to-read tab-delimited or CSV text file, or to a GPX file.

http://www.gpsvisualizer.com/convert_input

Correct answer by Mapperz on December 8, 2020

The question was asked years ago, so if you are searching for this recently and you are using or willing to use Python >= 3.5, you can use gpx_converter.

Install using pip
pip install gpx_converter
then use it by calling the csv_to_gpx in your case:
from gpx_converter import Converter

Converter(input_file='your_input.csv').csv_to_gpx(lats_colname='Lat',
                                                 longs_colname='Lon',
                                                 output_file='your_input.gpx')

Answered by basilisk on December 8, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP