[R-sig-Geo] reading gpx using readOGR
Manuel Schneider
manuel.schneider at art.admin.ch
Thu Aug 4 11:39:14 CEST 2011
Alternatively gpsbabel may be used to translate gpx to e.g. table format and
reading in.
#system call to gpsbabel
system(paste(path_to_gpsbabel," -w -i gpx -f ", infile,".gpx -o openoffice -F ",
outfile,".txt", sep=""))
#read-in data
d <- read.table(paste(outfile, ".txt", sep=""), h=T)
#conversion of openoffice time format
d$Time <- as.POSIXct(d$Time*86400,origin=as.Date("1899-12-30"), tz="UTC")
HTH
Manuel
More information about the R-sig-Geo
mailing list