forked from polmartisanahuja/gpxgenerator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.R
25 lines (19 loc) · 759 Bytes
/
main.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
library(rgl)
source("functions.R")
######### Main ########
path <- "tracks/"
file_list = c("trencacames-per-st-llorenc-i-lobac.gpx",
"hospital-de-sang-serra-de-lobac.gpx",
"6a-caminada-popular-cims-dels-tres-turons.gpx",
"la-mola-per-morral-del-drac-i-baixada-per-la-canal-del-mico.gpx")
i=4
track <- read_gpx(paste0(path, file_list[i]))
track <- smooth_gpx(track)
track <- track[(!is.na(track$lat)),]
#plot3d(track$lon, track$lat, track$ele, type='p', col='blue')
#lines3d(track$lon, track$lat, track$ele, col='yellow')
#points3d(track$lon, track$lat, track$ele, col='yellow')
rownames(track) <- 1:nrow(track)
track_list <- split_gpx(track)
track_list <- remove_short(track_list)
plot_gpx(track_list, track)