2

I want to animate people moving using temporal controller. I have a dataset that shows people's locations on a particular day, and these locations are points. I, however, want the points for each user to be united by a line across periods.

My data looks like this:

enter image description here

I have tried using the points to path tool, and that generates the paths I want but they don't animate.

I tried drawing the lines by creating geographic symbology, but for some reason, I only seem to be getting a line between the point at time 0 and all the other points at time 1,2,3 instead of a line between points 0-1, 1-2, 2-3.

The code that I tried is:

with_variable('data', array_agg("user", order_by:="week"), 
with_variable('user_index', array_find(@data, "user"), 
with_variable('next_feature', get_feature(@layer, 'user', array_get(@data, 
@user_index + 1)), make_line($geometry, geometry(@next_feature)) )))

For context, my second attempt is from this thread: Creating animated line moving between points in QGIS

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.