-
Notifications
You must be signed in to change notification settings - Fork 7
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
Location points moving #22
Comments
Hi @nhelm . Sorry for the delayed response. At the moment, there isn't a way to thin with spThin in anything other than decimal degree lat/lon values. This is because the distance calculation function fields::rdist.earth requires these kinds of values. This function should return pair-wise distances that preserve geographic distance. As for the second question, do you mean that there was some sort of error produced with switching to and from WGS84? I'm not too sure why that would happen to be honest. There is a possible work around. You could thin in WGS84, but rather than use the new lat/lon points, use the |
Hi @mlammens I'd like to use this work around, especially using the |
Hi @tinsman - Here's an example of what I'm talking about using the data set that is part of the spThin vignette:
Hope that helps! |
Awesome! Thank you so much.
…On Wed, Aug 11, 2021 at 5:29 AM Matthew Aiello-Lammens < ***@***.***> wrote:
Hi @tinsman <https://github.com/tinsman> - Here's an example of what I'm
talking about using the data set that is part of the spThin vignette:
1. Thin the data set (this is the code in the vignette)
thinned_dataset_full <-
thin( loc.data = Heteromys_anomalus_South_America,
lat.col = "LAT", long.col = "LONG",
spec.col = "SPEC",
thin.par = 10, reps = 100,
locs.thinned.list.return = TRUE,
write.files = FALSE,
write.log.file = FALSE)
1. Get the row names as numbers from one of the thinned datasets. Here
I'm just using the very first thinned data set. Also, note that I'm using
the as.numeric function here to convert the "names" to numbers.
as.numeric(row.names(thinned_dataset_full[[1]]))
1. Use these row numbers to index the original data set. Not that I'm
taking advantage of using row, column indexing of the original data.frame.
Heteromys_anomalus_South_America[as.numeric(row.names(thinned_dataset_full[[1]])),
]
Hope that helps!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#22 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AP6WNY75DHSREX476VW2SZTT4JUKTANCNFSM4GI5JL5A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Hello,
I am having a few issues attempting to thin species records. I am working with a species that has a relatively small range and would like to be able to thin records in a projection that preserves distance (in this case a UTM zone, the range falls only within one zone). My first question would be is it possible to use coordinates other than lat long (UTM in this case) while thinning? The algorithm runs but returns a locations not thinned correctly.
Because that wasn't working I projected my data to WGS84 with lat long coordinates. The data were thinned correctly, however, when I compared the remaining location points with my WGS84 projected data, the points that were preserved after thinning were anywhere from 9 to 15m away from any original location point. I am not sure why they would shift during the thinning process, any suggestions?
Thanks!
The text was updated successfully, but these errors were encountered: