Last active
May 27, 2017 01:21
-
-
Save iRGBit/cde5e5f4224efb3c4e91df2ba6264ae7 to your computer and use it in GitHub Desktop.
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
| import gpxpy | |
| import gpxpy.gpx | |
| gpx_file = open('activity_1758925412.gpx', 'r') | |
| vid_framerate = 30 | |
| vid_startframe = 9140 | |
| now = vid_startframe | |
| vid_name = 'papawai-imgs-' | |
| gpx = gpxpy.parse(gpx_file) | |
| for track in gpx.tracks: | |
| for segment in track.segments: | |
| for point in segment.points: | |
| for frame in range(0,vid_framerate): | |
| filename = '{0}{1}{2}'.format(vid_name, '%.5d' % now, '.jpg') | |
| print '{0}, {1}, {2}, {3}'.format(point.latitude, point.longitude, point.elevation, filename) | |
| now+=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment