Last active
February 9, 2020 13:39
-
-
Save WouterNieuwerth/f255ff6be41a3b219f7a5fb28c1a79dd to your computer and use it in GitHub Desktop.
GPX analysis - step 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for segment in gpx.tracks[0].segments: # all segments | |
data = segment.points | |
for point in data: | |
df = df.append({'lon': point.longitude, 'lat' : point.latitude, 'alt' : point.elevation, 'time' : point.time}, ignore_index=True) | |
df = df.sort_values(by=['time']) | |
df = df.reset_index() | |
df = df.fillna(method='ffill') | |
df = df.fillna(method='bfill') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment