Skip to content
Snippets Groups Projects
Commit 0a02d4a2 authored by Blodgett, David L.'s avatar Blodgett, David L.
Browse files

Add islands to git data

parent e87e299a
No related branches found
No related tags found
1 merge request!39Hawaii
---
title: "NHD Navigate"
title: "Alaska Data Prep and HU12 outlets"
output: html_document
---
......
......@@ -227,6 +227,11 @@ out_list <- c(out_list, list(VPU_outlets = VPU_outlets))
nhdplus_dir <- file.path(data_dir, "NHDPlusNationalData")
nhdplus_gdb <- file.path(data_dir, "NHDPlusNationalData/NHDPlusV21_National_Seamless_Flattened_Lower48.gdb")
islands_dir <- file.path(data_dir, "islands")
islands_gdb <- file.path(islands_dir, "NHDPlusNationalData/NHDPlusV21_National_Seamless_Flattened_HI_PR_VI_PI.gdb/")
if(!file.exists(nhdplus_dir)) {
message("downloading NHDPlus...")
......@@ -260,6 +265,18 @@ if(!file.exists(nhdplus_dir)) {
nhdplus_path(nhdplus_gdb)
suppressWarnings(staged_nhdplus <- stage_national_data())
x <- tryCatch(
download_nhdplusv2(islands_dir, "https://s3.amazonaws.com/edap-nhdplus/NHDPlusV21/Data/NationalData/NHDPlusV21_NationalData_Seamless_Geodatabase_HI_PR_VI_PI_03.7z"),
# Quiet the download, overwrite existing files
error = function(e)
{system(paste0(sevenz, " x ", file.path(islands_dir, "NHDPlusV21_NationalData_Seamless_Geodatabase_HI_PR_VI_PI_03.7z")
, " -o", data_dir), ignore.stdout = T)}
)
nhdplus_path(islands_gdb)
suppressWarnings(staged_nhdplus_islands <- stage_national_data())
rm(gLz, xWalk)
......@@ -269,7 +286,7 @@ if(!file.exists(nhdplus_dir)) {
}
out_list <- c(out_list, list(nhdplus_dir = nhdplus_dir, nhdplus_gdb = nhdplus_gdb))
out_list <- c(out_list, list(nhdplus_dir = nhdplus_dir, nhdplus_gdb = nhdplus_gdb, islands_dir = islands_dir, islands_gdb = islands_gdb))
```
```{r NHDPlusV2 Waterbodies}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment