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 · May be fixed by #99
Open

loc_check fails on SpatVector #91

courtiol opened this issue Oct 9, 2023 · 0 comments · May be fixed by #99

Comments

@courtiol
Copy link

courtiol commented Oct 9, 2023

There is a small issue in the code of loc_check:

https://github.com/jhollist/elevatr/blob/7b11c909df8838a93aaabfc3f247a804e91a5fdd/R/internal.R#L70

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

elipousson added a commit to elipousson/elevatr that referenced this issue Aug 20, 2024
Also add error message to avoid confusion like USEPA#96 and USEPA#94
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

Successfully merging a pull request may close this issue.

1 participant