2

I'm facing the problem that I want to calculate flight distances of Red Deer. I have a Layer with point Locations of animals; One attribute is the timestamp. I have another layer with point locations for humans who were trying to disturb the deer.

The problem is, I can't just calculate the distance between the points, because if the animal and the human are moving, the results will be wrong: if the animal moves away from the human, their paths will appear like they crossed although they both were not there at the same time.

So long story short:

I want to calculate the distances between human and animal simultaneously. What I want QGIS to do is to select all locations with the same/matching timestamp and calculate their distance.

4
  • Welcome to GIS Stack Exchange. What format is your timestamp?
    – AWGIS
    Commented Jan 23, 2019 at 12:52
  • 2
    If your timestamps from your Deer layer and Human layer are in the same format that you could use the distance matrix in QGIS and use the timestamp as your unique ID.
    – AWGIS
    Commented Jan 23, 2019 at 12:55
  • Hey there, My format is YYYY-MM-DD HH:MM:SS+00 (e.g. 2018-09-24 11:10:09+00)
    – Dominik
    Commented Jan 24, 2019 at 9:07
  • I made up a distancematrix, using the Timestamp as unique ID. Then I tried to Select the distances where the InputID matches/is the same aus the TargetID. But since the Timestamps are eventually not exactly the same, the Result is Zero Distances (With matching Timestamps. So I may have to convert the Format of the Timestamps...
    – Dominik
    Commented Jan 24, 2019 at 9:11

1 Answer 1

4

You can use points to path using timestamp to group points. This should create lines between points with identical timestamp atttibute then use field calculator to get line distances.

In case timestampes are not exactly identical, use field calculator to round times as much as necessary.

1
  • 2
    Hey there, Thanks for your input. As I wrote in the comment above, the problem has been that the Timestamps were not exactly the same. But I managed it now by coverting the Timestamp Values to another Format. With "yyyy-DD-MM HH:mm" (so without seconds) it works out well. I Did this by using the field calculator, as you suggested it. The term was "format_date"
    – Dominik
    Commented Jan 24, 2019 at 11:20

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.