es.uv.robotica.gvsig.mobile.gps.tracklog
Class GPXTracklogger

java.lang.Object
  extended byes.uv.robotica.gvsig.mobile.gps.tracklog.GPXTracklogger
All Implemented Interfaces:
Tracklogger

public class GPXTracklogger
extends java.lang.Object
implements Tracklogger

A tracklogger storing trackpoints and waypoints in GPX format

Author:
jgui
See Also:
CSVTracklogger

Field Summary
static java.lang.String GPX_TRACKLOG_HEADER
          GPX header
static java.lang.String GPX_TRACKLOG_TAG_GPX
           
static java.lang.String PAD
           
 
Constructor Summary
GPXTracklogger()
           
 
Method Summary
 void clear()
          Clears the tracklog.
 void close()
          Closes the tracklog
 void open(java.lang.String path)
          Opens the tracklog TODO If file exists, should look for last or tag
 void start()
          Starts tracking.
 void stop()
          Stops tracking.
 void storeTrackpoint(Trackpoint _trkpt)
          Stores a trackpoint in the tracklog
 void storeWaypoint(Waypoint _wpt)
          Stores a waypoint in the tracklog
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GPX_TRACKLOG_HEADER

public static final java.lang.String GPX_TRACKLOG_HEADER
GPX header

See Also:
Constant Field Values

GPX_TRACKLOG_TAG_GPX

public static final java.lang.String GPX_TRACKLOG_TAG_GPX
See Also:
Constant Field Values

PAD

public static final java.lang.String PAD
See Also:
Constant Field Values
Constructor Detail

GPXTracklogger

public GPXTracklogger()
Method Detail

open

public void open(java.lang.String path)
          throws java.io.IOException
Opens the tracklog TODO If file exists, should look for last or tag

Specified by:
open in interface Tracklogger
Parameters:
path - the complete path, including the folder and file name
Throws:
java.io.IOException

close

public void close()
Closes the tracklog

Specified by:
close in interface Tracklogger

start

public void start()
Starts tracking. Includes opening tags < trk > and < trkseg > if necessary

Specified by:
start in interface Tracklogger

stop

public void stop()
Stops tracking. Includes closing tags < /trk > and < /trkseg > if necessary

Specified by:
stop in interface Tracklogger

clear

public void clear()
           throws java.io.IOException
Clears the tracklog. Includes writing header and opening tag < /gpx >

Specified by:
clear in interface Tracklogger
Throws:
java.io.IOException

storeTrackpoint

public void storeTrackpoint(Trackpoint _trkpt)
Stores a trackpoint in the tracklog

Specified by:
storeTrackpoint in interface Tracklogger
Parameters:
_trkpt - the trackpoint to store

storeWaypoint

public void storeWaypoint(Waypoint _wpt)
Stores a waypoint in the tracklog

Specified by:
storeWaypoint in interface Tracklogger
Parameters:
_wpt - the waypoint to store