GunRunMaps/GIS Base Map/timelapse.md

27 lines
1.1 KiB
Markdown

= To Create a Timelapse =
Set begin on each route to the start time of each race.
Use Locate Points on Line to create a layer that has one point every meter (about 35000 total). On a EPSG:4326 projection, this means intervals of 0,00001. Turn on "Keep Attributes" as well.
Each point will have a "distance" field, which calculates the distance of that point along the route. This may well be in hundreds of kilometers; check out the maximum value of the field, and if necessary, convert the distance to meters with the field calculator:
Update distance:
```
"distance" * 100000
```
(The longest `distance` element should be around 21000).
Generate a second-based offset for the first and last runner past each meter, and translate it into a time:
```
5*60+((10*60)/1000)*"distance"
```
Then, calculate
first_runner (string):
to_time(to_datetime( "begin" ) + ((3*60/1000*"distance")+0.01) || ' seconds')
last_runner (string):
to_time(to_datetime( "begin" ) + (5*60+(10*60/1000*"distance")) || ' seconds')
Then use this layer as your starting point for Time Manager. Remember to save and mark the layer as read-only before starting.