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

get_ssurgo only downloading first item in list for template #51

Closed
kross0926 opened this issue Apr 9, 2020 · 6 comments
Closed

get_ssurgo only downloading first item in list for template #51

kross0926 opened this issue Apr 9, 2020 · 6 comments

Comments

@kross0926
Copy link

When using get_ssurgo() and supplying a vector of area names the tool is only downloading one of the items. Oddly enough in the example code its the second item. This is happening with both my code and the code in the example:

SSURGO.areas <- get_ssurgo(template=c('CO670','CO075'), label='CO_TEST')

I've also tried supplying a spatial object to extract the databases but I get his error...which I was assuming is because my download area is too large? (the polygon is 39 HUC 12 boundaries so its likely this is could be the case)

Error in { :
task 2 failed - "trying to get slot "data" from an object of a basic class ("NULL") with no slots"

@bocinsky
Copy link
Collaborator

bocinsky commented Apr 9, 2020

Hi here. Thanks for catching this... I just pushed a change that should fix the multi-area problem, though you'll have to install the development version:

#install.packages("devtools")
devtools::install_github("ropensci/FedData")

Could you give me some more details on your second problem? The get_ssurgo method downloads data by SSURGO study area serially and then stitches them together; in theory, it doesn't have a maximum area of interest size.

@kross0926
Copy link
Author

kross0926 commented Apr 9, 2020

ok if there is no maxiumum size, I'm wondering if its a difference in projection issue? The spatial object is a dissolved set of HUC12 boundaries, and I have reprojected it to EPSG:4326 ("GCS_WGS_1984"). If it will help more I can send you the shapefile and my code?

@bocinsky
Copy link
Collaborator

bocinsky commented Apr 9, 2020 via email

@kross0926
Copy link
Author

ok, here is the code, and the shapefile
get_SSURGO_test.zip

Thanks for your help!

@bocinsky
Copy link
Collaborator

Hey hey. Alright, I pushed a fix last night. Your area of interest wasn't too big, but what's interesting about it is that its bounding box overlapped some SSURGO survey areas that the AOI didn't. There was a line in the code that cropped each survey area prior to merging them all together, and it was choking on cropping by non-overlapping areas. It should work for you now. Keep in mind that this is in the development version... I'm continuing to make changes here (having frozen the CRAN version), and so keep an eye on the NEWS.md file for API changes.

I'm going to close this now, but please let me know that you were able to get the data you needed.

@kross0926
Copy link
Author

kross0926 commented Apr 10, 2020 via email

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

2 participants