-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- still working on T-SQL/SQLite cross-compatibility
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
library(soilDB) | ||
|
||
exdir <- "~/ssurgo_test" | ||
downloadSSURGO(areasymbols = "CA628", destdir = exdir) | ||
createSSURGO("~/CA628.gpkg", exdir, overwrite = TRUE) | ||
|
||
# working | ||
get_SDA_coecoclass(areasymbols = "CA628", dsn = "~/CA628.gpkg") | ||
get_SDA_cosurfmorph(areasymbols = "CA628", dsn = "~/CA628.gpkg") | ||
get_SDA_muaggatt(areasymbols = "CA628", dsn = "~/CA628.gpkg") | ||
get_SDA_pmgroupname(areasymbols = "CA628", dsn = "~/CA628.gpkg", method = "none") | ||
get_SDA_property("claytotal_r", areasymbols = "CA628", dsn = "~/CA628.gpkg", method = "none") | ||
get_SDA_interpretation("ENG - Construction Materials; Roadfill", method = "none", areasymbols = "CA628", dsn = "~/CA628.gpkg") # very slow | ||
|
||
# not yet working | ||
# get_SDA_pmgroupname(areasymbols = "CA628", dsn = "~/CA628.gpkg") # TOP 1 / temp tables | ||
# get_SDA_hydric(areasymbols = "CA628", dsn = "~/CA628.gpkg") # TOP 1 / temp tables | ||
# get_SDA_interpretation("ENG - Construction Materials; Roadfill", method = "dominant component", areasymbols = "CA628", dsn = "~/CA628.gpkg") #TOP 1 | ||
# get_SDA_interpretation("ENG - Construction Materials; Roadfill", method = "dominant condition", areasymbols = "CA628", dsn = "~/CA628.gpkg") #TOP 1 | ||
# get_SDA_interpretation("ENG - Construction Materials; Roadfill", method = "weighted average", areasymbols = "CA628", dsn = "~/CA628.gpkg") #TOP 1 | ||
# get_SDA_property("claytotal_r", areasymbols = "CA628", dsn = "~/CA628.gpkg") # TOP 1 / temp tables | ||
|
||
SDA_query("SELECT STRING_AGG(interphrc, '; ') | ||
FROM mapunit AS mu | ||
INNER JOIN component AS c ON c.mukey = 2924882 AND compkind != 'miscellaneous area' AND c.cokey = 21139800 | ||
INNER JOIN cointerp AS coi ON c.cokey = coi.cokey AND mu.mukey = 2924882 | ||
AND ruledepth != 0 AND interphrc NOT LIKE 'Not%' AND mrulename LIKE 'ENG - Construction Materials; Roadfill'") | ||
|