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

loc_check fails on SpatVector #91

Open
courtiol opened this issue Oct 9, 2023 · 0 comments
Open

loc_check fails on SpatVector #91

courtiol opened this issue Oct 9, 2023 · 0 comments

Comments

@courtiol
Copy link

courtiol commented Oct 9, 2023

There is a small issue in the code of loc_check:

locations <- sf::st_as_sf(terra::as.points(locations, values = FALSE),

values = FALSE does not work with SpatVector.

Example:

packageVersion("terra")
#> [1] '1.7.46'
packageVersion("rnaturalearth")
#> [1] '0.3.4'
oceans_sf <- rnaturalearth::ne_download(category = "physical", scale = "small",
                                        type = "ocean", returnclass = "sf")
#> The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
#> which was just loaded, were retired in October 2023.
#> Please refer to R-spatial evolution reports for details, especially
#> https://r-spatial.org/r/2023/05/15/evolution4.html.
#> It may be desirable to make the sf package available;
#> package maintainers should consider adding sf to Suggests:.

oceans_terra <- terra::vect(oceans_sf)
oceans_terra <- terra::project(oceans_terra, "EPSG:32662")

worldelev_raster <- elevatr::get_elev_raster(locations = oceans_terra, z = 1)
#> Error in .local(x, ...): unused argument (values = FALSE)

Created on 2023-10-09 with reprex v2.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant