ropensci / FedData

Functions to Automate Downloading Geospatial Data Available from Several Federated Data Sources
https://docs.ropensci.org/FedData
Other
97 stars 22 forks source link

FedData interface with gSSURGO #53

Closed kevinwolz closed 3 years ago

kevinwolz commented 4 years ago

Are there any plans to enhance FedData to interface with gSSURGO as well? Is it possible to easily modify get_ssurgo to pull the gridded data rather than the polygon data? Thanks!

bocinsky commented 4 years ago

It’s on my list! Thanks Kevin.

On Apr 27, 2020, at 9:55 AM, Kevin J Wolz notifications@github.com wrote:

Are there any plans to enhance FedData to interface with gSSURGO as well? Is it possible to easily modify get_ssurgo to pull the gridded data rather than the polygon data? Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ropensci/FedData/issues/53, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7SSM5FQILC4RQXQGJLRRTROWTIBANCNFSM4MSBMI7A.

bocinsky commented 4 years ago

Hey @kevinwolz. Do you know where they are keeping the gridded data right now, and whether NRCS has released a web service for the gSSURGO data?

dylanbeaudette commented 4 years ago

Folks, gSSURGO is just SSURGO that has been repackaged into a slightly different format: ESRI FGDB that contains a gridded representation of the map unit polygons at 10m or 30m resolution. If you have the a gSSURGO database (county, state, or CONUS) then you already have "everything".

That said, it should be possible to make a web service interface to something resembling gSSURGO by sourcing two data sources:

Efforts to create a "gSSURGO Lite" have stalled due to more pressing issues--maybe this is a good time to put a prototype together (map unit key grid via WMS) and host via SoilWeb. I'll check-in with the guy in charge of gSSURGO and see about getting the gridded map unit keys.

bocinsky commented 4 years ago

That seems to be exactly what's needed, @dylanbeaudette. A WMS/WCS of the gridded mukeys and perhaps pre-joined with the VALU database would enable folks to map and spatially extract the data they need, without having to use the ESRI toolkit. Thanks for considering it!

dylanbeaudette commented 4 years ago

I've got an example grid of map unit keys, just need to setup a simple WCS and perform some benchmarks.

bocinsky commented 4 years ago

That's great, Dylan. Thanks.

potash commented 3 years ago

Came here to request gSSURGO support as I am specifically interested in the VALU database mentioned above. Thanks for this very useful project.

dylanbeaudette commented 3 years ago

Working on the gNATSGO and gSSURGO WCS. Should be in soilDB very soon.

bocinsky commented 3 years ago

Excited to link up to it, Dylan! Thank you!

On Dec 17, 2020, at 6:44 PM, Dylan Beaudette notifications@github.com wrote:

Working on the gNATSGO and gSSURGO WCS. Should be in soilDB very soon.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ropensci/FedData/issues/53#issuecomment-747813939, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7SSM4YQKGQCYI5RH6UFZDSVKXYDANCNFSM4MSBMI7A.

kevinwolz commented 3 years ago

Great news! Thanks for moving it forward!

dylanbeaudette commented 3 years ago

Be sure to install the latest version of soilDB from github.

Demonstration of the new functionality here: https://github.com/ncss-tech/soilDB/blob/master/misc/WCS-SDA-example.R

A couple of major TODO items:

Limitations:

It appears to work well using WCS 2.0.1 specifications and on-the-fly compression. At the limit of roughly 5000x5000 pixels, you can request about 1x1 degrees worth of data at 30m resolution, resulting in a ~3.5Mb GeoTiff.

I'm not sure how this fits into {FedData}, but this is now a fully supported / documented function in {soilDB}. Inclusion of the value1 table should be moved to a new thread.

potash commented 3 years ago

Thanks @dylanbeaudette ! I'm trying the script you referenced but I get the following error when running (x <- mukey.wcs(db = 'gnatsgo', aoi = a)):  Error in CRS(value) : no arguments in initialization list. Any ideas?

> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 10 (buster)

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3
LAPACK: /usr/lib/x86_64-linux-gnu/atlas/liblapack.so.3.10.3

locale:
 [1] LC_CTYPE=en_US.UTF-8      
 [2] LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8      
 [8] LC_NAME=C                 
 [9] LC_ADDRESS=C              
[10] LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8
[12] LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics 
[3] grDevices utils    
[5] datasets  methods  
[7] base     

other attached packages:
[1] soilDB_2.5.9

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.5       
 [2] cluster_2.1.0    
 [3] knitr_1.30       
 [4] xml2_1.3.2       
 [5] raster_3.4-5     
 [6] magrittr_2.0.1   
 [7] lattice_0.20-41  
 [8] rlang_0.4.9      
 [9] stringr_1.4.0    
[10] plyr_1.8.6       
[11] tools_4.0.3      
[12] rgdal_1.5-18     
[13] grid_4.0.3       
[14] data.table_1.13.2
[15] xfun_0.19        
[16] htmltools_0.5.0  
[17] yaml_2.2.1       
[18] digest_0.6.27    
[19] reshape2_1.4.4   
[20] codetools_0.2-16 
[21] curl_4.3         
[22] rlist_0.4.6.1    
[23] evaluate_0.14    
[24] rmarkdown_2.5    
[25] aqp_1.25         
[26] sp_1.4-4         
[27] stringi_1.5.3    
[28] compiler_4.0.3   
[29] reshape_0.8.8