-
Notifications
You must be signed in to change notification settings - Fork 6
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
Remove rgeos/rgdal dependencies and update functions for sf/terra/stars #90
Comments
I ran into this dependency problem today, as I'm trying to do the exercises in Module 6 of the Contributing and publishing datasets to OBIS Course in Ocean Teacher. Now I'm stuck, as the course instructs you to use |
Thanks, we'll fix this asap. |
Tracking this in https://github.com/iobis/obistools/tree/fix-spatial/. |
@silasprincipe Do you have some time to work on the raster issue at https://github.com/iobis/obistools/blob/master/tests/testthat/test_check_depth.R#L83? Alternatively we can remove the custom bathymetry functionality for now. @rubenpp7, do any of your tools use the |
If anyone wants to test, please try:
Note that outlier detection is currently not working, and the use of external bathymetry layers has been disabled. The package still depends on
|
Hi @pieterprovoost, I restored the custom bathymetry to use only Also did some work on the Passing all tests through test_that("calculate_centroid accross dateline works", {
centr <- calculate_centroid("POLYGON ((179 -1, 179 1, -179 1, -179 -1, 179 -1))")
expect_equal(abs(centr[1,1]), 180)
expect_equal(centr[1,2], 0)
}) But the previous version (mix sf+terra) was also failing at this one. Not sure if this is something we should bother for now. Dependency from |
Hey @pieterprovoost and @silasprincipe , Thanks a lot for working on this. |
@pieterprovoost performed tests on Windows today. Had to add |
Thanks all for your prompt work on this! I was able to use |
@reblake thanks for the feedback! I tested here and both the @pieterprovoost I did one more commit: I removed the full import of the |
@silasprincipe , I've put an example that should reproduce the error and weird plot from the mapping functions (it does on my machine) in this gist rather than clogging up this issue. I've also included my |
@reblake Regarding the gist, is it possible that longitude and latitude are switched? |
@pieterprovoost yes, this is the problem - I just answered you @reblake on your gist about that, check the solution there. |
Thanks @silasprincipe. My manual plotting worked exactly correctly, so I didn't think this was the problem. |
rgeos
andrgdal
will be retired later this year (in fact,rgeos
is already down).obistools
have some dependencies on these packages that will make it non functional soon (see lines 40/41 of NAMESPACE).Suggestions:
rgeos::gDistance
tosf::st_distance
(to check)rgeos::readWKT
tosf::st_read
orterra::vect
(to check which one is better suited)sp
to modernsf
raster
to modern and fasterterra
This may include a revision of
obistools
to check if any function deserves an update or deprecation.The text was updated successfully, but these errors were encountered: