scanGPSTrack: Scan GPS Track Data into a GPSTrack class Object

Description Usage Arguments Details Value See Also

View source: R/GPSTrack.R

Description

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

Usage

1
scanGPSTrack(con, fields, dateTimeFormat)

Arguments

con

A file name or open connection from which to read the data.

fields

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.

dateTimeFormat

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".

Details

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.

Value

An object of GPSTrack containing the coordinates and time as scanned.

See Also

GPSTrack


SoDA documentation built on Oct. 28, 2020, 9:07 a.m.