Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Use case] Visually cleaning a trajectory #1

Closed
comtes opened this issue Sep 30, 2019 · 3 comments
Closed

[Use case] Visually cleaning a trajectory #1

comtes opened this issue Sep 30, 2019 · 3 comments
Labels
use-case Use cases

Comments

@comtes
Copy link

comtes commented Sep 30, 2019

Use case:
Being able to plot the trajectory of an animal. Then visually select outliers and being able to edit the information linked with these location fixes.

Requirements:
spatial coordinates (x,y) as geographic coordinates with projection information
a time (t) as POSIXt object, ordered in time
A quality information: being able to easily 'tag' fixes that are obviously outliers or result of a malfunction of the collar.
A graphic interface to directly click on the fixes to edit the field

Input:
sftraj object with a field 'quality'

Output:
same sftraj as input, but the quality field updated.

Additional information:

@basille basille added the use-case Use cases label Oct 1, 2019
@basille
Copy link
Member

basille commented Oct 1, 2019

Thanks Sebastien for the input! This one is a tough one… as it requires dynamic interaction with the sftraj object. I don't think that can make it into the first releases of the package, but that is something we need to keep in mind to make sure it works with a function which would do exactly this.

Just to be clear, the 'quality' information that you mentioned would be a flag — can be anything else as well, as long as it is visually determined (by mouse clicks).

As a first approach, and given that sftraj will rely on sf, the use of identify could get you there. For instance, if sf_obj is your sf object (and trajectories in sftraj will be), something like this works:

library(sf)
demo(nc, ask = FALSE, echo = FALSE)
sf_obj <- st_geometry(st_centroid(nc))
plot(sf_obj, pch = 3, col = "red", axes = TRUE)
identify(st_coordinates(sf_obj))

or, using ggplot2:

ggplot() + geom_sf(data = sf_obj)
identify(st_coordinates(sf_obj))

@basille basille closed this as completed Oct 1, 2019
@birderboone
Copy link
Member

I'm re-opening some of these use-cases so theyre easier to find as people submit new ones.

@birderboone birderboone reopened this Oct 17, 2019
@basille
Copy link
Member

basille commented Jun 3, 2022

Closing this issue now that sftrack is developed and on CRAN.

@basille basille closed this as completed Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
use-case Use cases
Projects
None yet
Development

No branches or pull requests

3 participants