3

I'm trying to find a way to visualize/animate migration tracks of wildlife in QGIS starting from multitemporal GPS data (so point data of different animals over at different points in time).

An example of the kind of dataset I'm wanting to use is https://www.datarepository.movebank.org/handle/10255/move.585

I've managed to make a basic animation using the new Temporal controller, but rather than having distinct points moving step by step on the map, I would like the path between the different locations in time to be gradually visualised, like a step-wise version of the points-to-path tool. Is there a tool/plugin that can be used in QGIS to obtain something like this, or a similar open-source tool that doesn't require coding?

edit: The TimeManager plugin made it possible to make a linear interpolation on fixed time steps, I was thinking that this could make my animation seem more smooth, but it seems that the new temporal controller does not seem to offer this option

3
  • 1
    Is there a reason you do not want to code? R has packages designed to work with this type of data and do exactly what you want with very easy to follow tutorials.
    – Adam Thom
    Aug 6, 2021 at 14:43
  • Thanks for the quick response, I want to incorporate it as a data visualisation excercise in an introductory course of GIS in wildlife management (undergraduate level). While I have a basic knowledge of R , the students will have no previous experience so they will not be able to use R themselves. Aug 6, 2021 at 15:09
  • If you do decide to explore the R route, movevis.org has an excellent tutorial
    – Adam Thom
    Aug 6, 2021 at 15:29

1 Answer 1

1

You can interpolate in the geometry generator in QGIS.

For example for an image like: https://gisforthought.com/media/2017-09-06_rIXoYSN.gif

I had hurricane path data for every 6 hours, but wanted to show hourly movement. So it just interpolated the position of the hurricane between the two known points.

Geometry generator:

    line_interpolate_point(
Make_line(
geometry(
case when right(to_string(attribute(@atlas_feature , 'id')),2) IN ('00', '06', '12', '18') then
    get_feature(  @layer_name , 'dtg', attribute(  @atlas_feature , 'id') )
else
    get_feature(  @layer_name , 'dtg',  attribute(  @atlas_feature , 'id') - (attribute(  @atlas_feature , 'id') % 100 % 6  ))
end)
,
geometry(
case
    when right(to_string(attribute(@atlas_feature , 'id')),2) IN ('00', '06', '12') then
        get_feature(  @layer_name , 'dtg', attribute(  @atlas_feature , 'id') + 6 )
    when right(to_string(attribute(@atlas_feature , 'id')),2) IN ('18') then
        get_feature(  @layer_name , 'dtg', attribute(  @atlas_feature , 'id') + 100 - 18 )
    when to_int(right(to_string(attribute(@atlas_feature , 'id')),2)) > 18 then
        get_feature(  @layer_name , 'dtg',  attribute(  @atlas_feature , 'id') - ((attribute(  @atlas_feature , 'id') % 100 % 6)  ) + 100 - 18)
    else
        get_feature(  @layer_name , 'dtg',  attribute(  @atlas_feature , 'id') - ((attribute(  @atlas_feature , 'id') % 100 % 6)  ) + 6)
end)
),
length(Make_line(geometry(
case when right(to_string(attribute(@atlas_feature , 'id')),2) IN ('00', '06', '12', '18') then get_feature(  @layer_name , 'dtg', attribute(  @atlas_feature , 'id') )
else get_feature(  @layer_name , 'dtg',  attribute(  @atlas_feature , 'id') - (attribute(  @atlas_feature , 'id') % 100 % 6  ))
end
)
,
geometry(
case
    when right(to_string(attribute(@atlas_feature , 'id')),2) IN ('00', '06', '12') then
        get_feature(  @layer_name , 'dtg', attribute(  @atlas_feature , 'id') + 6 )
    when right(to_string(attribute(@atlas_feature , 'id')),2) IN ('18') then
        get_feature(  @layer_name , 'dtg', attribute(  @atlas_feature , 'id') + 100 - 18 )
    when to_int(right(to_string(attribute(@atlas_feature , 'id')),2)) > 18 then
        get_feature(  @layer_name , 'dtg',  attribute(  @atlas_feature , 'id') - ((attribute(  @atlas_feature , 'id') % 100 % 6)  ) + 100 - 18)
    else
        get_feature(  @layer_name , 'dtg',  attribute(  @atlas_feature , 'id') - ((attribute(  @atlas_feature , 'id') % 100 % 6)  ) + 6)
end)))
*
((attribute(  @atlas_feature , 'id') % 100 % 6) * 0.16666666666666666))

A lot of the code is just to get the correct features.

See full post: https://gisforthought.com/storm-harvey-qgis-geometry-generator/

An easier option is to just use the last two points for a dataset all the time to generate a line.

For example:

https://i.imgur.com/DBViVFG.mp4

This is just point data, but shown as a line current point between the current point and the previous one.

make_line(
geometry(  get_feature_by_id(  @layer , $id - 1 )),
$geometry
)

enter image description here

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.