1

I have a series of coordinates associated with ID and date (these points represent individual recaptures of individuals at different locations). I want to joins lines between the sequential recaptures of these individuals to 1) visualise their movement, and 2) calculate metrics such as mean distance moved by each individual.

Points2One seems like the best was to do it but is not available on QGIS3. I tried the function points to path, but this did not connect the points in the correct order, and additionally turns everything into one line which is not what I want.

e.g.

enter image description here

3
  • 1
    Do you have a sample data file, like a CSV, Excel, or Shapefile that we can work on? Even one that is similar to your data if you can't release your data would be handy.
    – Spacedman
    Dec 17, 2018 at 14:04
  • Sorry, I don't know if I can upload a csv/excel file, but I have attached an example of the data Dec 17, 2018 at 14:48
  • 1
    If your DATE field is formatted in dd/MM/yy, you can change it to yyyy-MM-dd by the Field Calculator so that Points to path can understand the order. For instance '20' || substr("DATE", 7, 2) || '-' || substr("DATE", 4, 2) || '-' || substr("DATE", 1, 2)
    – Kazuhito
    Dec 17, 2018 at 18:03

1 Answer 1

3

Images of data are a bit hard to read in... But...

If you read it into R as a data frame then you can group it by ID and sort it by Date and that gives you the points of the track, which can then be plotted or have the distance and speed calculated...

...but you might want to investigate some of the R packages for animal tracking that are designed for this sort of data and provide a richer experience. For example:

https://cran.r-project.org/web/packages/adehabitatLT/index.html

which I think is the longest-established of the bunch. Have a read of the vignette: https://cran.r-project.org/web/packages/adehabitatLT/vignettes/adehabitatLT.pdf

A load more useful things might be found in the "Moving objects, trajectories" section of the space-time Task View:

https://cran.r-project.org/web/views/SpatioTemporal.html

If you have more specific problems trying to read your data into any of these, then ask a detailed question here, tag it [r] and I'll certainly see it.

Your Answer

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

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