added layers variable to 2nd script
This commit is contained in:
parent
87e087a5a7
commit
9cf982c483
@ -1,4 +1,5 @@
|
||||
# load libraries
|
||||
library(nhdplusTools)
|
||||
library(sf)
|
||||
|
||||
# reload extent data so you don't need to run the download data script again
|
||||
@ -26,6 +27,10 @@ extent <- list(longitude_max = max(extent$longitude),
|
||||
# load and crop hydrologic data
|
||||
data <- list(NULL)
|
||||
sf_use_s2(FALSE)
|
||||
layers <- c("NHDArea",
|
||||
"NHDFlowline",
|
||||
"NHDWaterbody",
|
||||
"NHDPlusLandSea")
|
||||
for (layer in layers){
|
||||
data[[layer]] <- st_crop(st_read(paste0(nhdplusTools_data_dir(),"/data.gpkg"), layer = layer), y = extent_bbox)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user