GunRunMaps/GIS Base Map/timelapse.md

31 lines
1.1 KiB
Markdown
Raw Normal View History

2019-09-19 08:48:36 +00:00
= 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 ten meters (about 3500 total). On a EPSG:4326 projection, this means intervals of 0,0001. Turn on "Keep Attributes" as well.
2019-09-19 08:48:36 +00:00
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_1" * 100000
2019-09-19 08:48:36 +00:00
```
(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_time (String of length 20):
```
to_datetime( "begin" ) + (((3*60/1000*"distance_1")+0.01) || ' seconds')
```
last_time (String of length 20):
```
to_datetime( "begin" ) + (((5*60)+(10*60*"distance_1")/1000) || ' seconds')
```
2019-09-19 08:48:36 +00:00
Then use this layer as your starting point for Time Manager. Remember to save and mark the layer as read-only before starting.