`get_nhdplus` throwing an error - crs
Closed this issue · 1 comments
Hello -
Thanks for hosting this package and developing new hydrofabric tools. I'm running into a weird, new issue getting NHDPlusV2 data that I'm having trouble fully tracing, explaining, or remedying.
huc02 <- nhdplusTools::get_huc(id = 18, type = "huc02")
fl <- nhdplusTools::get_nhdplus(AOI = huc02, realization = "flowline")
The get_nhdplus
call returns an error (Getting tile
is printed for tiles 2-29 too but not necessary here):
Getting tile 30 of 30
Error: arguments have different crs
Spherical geometry (s2) switched on
I've had no issue with this call in the past. This error doesn't show up with an AOI-based call to get HUCs - this works fine:
huc04 <- nhdplusTools::get_huc(AOI = huc02, type = "huc04")
The error message seems to come from sf::chk_equal_crs
(called in sf::rbind.sf
?). I've recently updated relevant packages and my operating system - here's relevant session info:
version R version 4.3.1 (2023-06-16)
os macOS Sonoma 14.0
rstudio 2023.09.0+463 Desert Sunflower (desktop)
hydroloom 1.0.0 2023-10-05 [1] Github (doi-usgs/hydroloom@286c61f)
nhdplusTools 1.0.0 2023-10-02 [1] CRAN (R 4.3.1)
sf 1.0-14 2023-07-11 [1] CRAN (R 4.3.0)
Can you reproduce this on your end?
I am able to reproduce and narrowed this down to a couple of 0-row tables in the set of downloaded tables. I should have a fix up soon.