Attempts to scan a file or other connection containing GPS track information in a typical format, and to store the data in an object from class '>GPSTrack
.
Optional arguments define the layout of lines and the format used for date/time information
scanGPSTrack(con, fields, dateTimeFormat)
A file name or open connection from which to read the data.
An optional list for use by scan
to interpret the fields in each line of the file. The list must include the names in the default list, which is list(date = "", time = "", lat = 0, lon = 0, el = 0)
. Note that other fields can be included to skip over data not needed for the track information, and that the field names can be longer, provided that the versions here match by partial matching.
An optional character string format for the date and time, in the scheme used by strptime
. The default is the standard date/time format, "%Y-%m-%d%H:%M:%S"
.
An object of '>GPSTrack
containing the coordinates and time as scanned.
Data is read from the connection by scan()
, and the date and time components are then re-read by strptime
, and a new object of class "GPSTrack"
is created from the results. The scan takes in all the lines available.