<-- back to my GPS Page


NAME

csv2kml - convert QstarZ csv file into GoogleEarth kml or gpx file, also geotag photos.


SYNOPSIS

csv2kml csvfilename [options]

Options: --outgpxlong filename --outgpxshort filename --outkmllong filename --outkmlshort filename --jpegdir directory --hdop number --mindist number --maxskew* number --overwrite* --noupdate* --dryrun --reverse --help --man

(* = not implemented yet)


OPTIONS

--outgpxlong filename

The name of the output gpx file that is only HDOP filtered (default is no output)

--outgpxshort filename

The name of the output gpx file that is HDOP filtered, as well as cropped from second to last button presses, and with all points less than MINDIST metres apart removed (default is no output)

--outkmllong filename

The name of the output kml file (same data as long gpx file) (default is no output)

--outkmlshort filename

The name of the output kml file (same data as short gpx file) (default is no output)

--jpegdir directory

Alternate directory to look for jpeg files (default is current directory)

--hdop number

Max HDOP value for filtering bad gps data (default 2.5)

--mindist number

Value in metres for filtering points too close together on 'short' output (default is 20)

--maxskew number

Maximum value in seconds for difference in time of first jpeg and first button press (default is 600)

--overwrite

Overwrite existing EXIF GPS data in jpeg files (default is to calculate and write out GPS data to those jpeg files that do not have it, and use existing GPS EXIF data when outputting waypoits to gpx or kml files)

--noupdate

Do not modify the jpegs, but read/calculate their GPS data and dump it to the gpx/kml files. A bit like a 'dryrun', but it enables you to sanity check the photo positions in Google Earth/Google Maps before actually modifying the photos.

--dryrun

Suppress all output to files, just display messages/statistics on screen

--reverse

Reverses order of output tracks and waypoints so it goes from the end of the csv file to the beginning

--help

Print a brief help message and exits.

--man

Prints the manual page and exits.


DESCRIPTION

csv2kml will convert a QstarZ csv file into a GoogleEarth kml file or a gpx file, the first button press in the csv data is assumed to be simultaneous with first jpeg (when sorted by time) the offset between these two times used to write accurate GPS data to EXIF headers of jpegs.

Button presses and jpeg pictures are output to the kml/gpx file as waypoints, 'T' events used to generate ground tracks in kml/gpx file, the second and the last button presses set the endpoints of the track. Track is filtered for points less than mindist Metres apart and all points where HDOP is greater than hdop are totally ignored.


EXAMPLES

Current example of use - it does not do much yet ...

 $ ./csv2kml newton01.csv --outgpxshort newton-exeter.gpx
 9 jpegs found.
 Ref button press was at index # 8735
 Start button press was at index # 8750
 Stop button press was at index # 10893
 attempting to output to newton-exeter.gpx, from 8750 to 10893
 3 waypoints dumped to gpx file
 12262 read in, 1418 written out
 length of trace is 2143 csv_seconds

 $ ./csv2kml newton01.csv --reverse --outgpxshort exeter-newton.gpx
 9 jpegs found.
 Ref button press was at index # 8735
 Start button press was at index # 8750
 Stop button press was at index # 10893

 attempting to output to exeter-newton.gpx, from 10893 to 8750
 3 waypoints dumped to gpx file
 12262 read in, 1418 written out
 length of trace is 2143 csv_seconds


COPYRIGHT

 Copyright 2007, 2008 by David R Morgan
 released under GPL v2, use at your own risk
 patches for corrections/improvements welcome