GunRunMaps/GIS Base Map/timelapse.md

1.3 KiB

= To Create a Timelapse =

Set the field "begin" on each route in all_routes 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.

Each point in the resulting virtual layer 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:

round("distance" * 100000, 0)

(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_time(to_datetime( "begin" ) + (((3*60/1000*"distance")+0.01) || ' seconds'))

last_time (String of length 20):

to_time(to_datetime( "begin" ) + (((5*60)+(10*60*"distance")/1000) || ' seconds'))

Make certain all these values are saved, and set the layer to read-only (disable editing).

Then use this layer as your starting point for Time Manager. Remember to save and mark the layer as read-only before starting.