From 637d6e7884192ec3a3320882b3417541a414105e Mon Sep 17 00:00:00 2001
From: David Blodgett
Date: Thu, 12 Dec 2024 14:15:10 -0600
Subject: [PATCH 1/3] update labs nldi links to api.water
---
demo/index.Rmd | 6 +++---
demo/index.html | 20 +++++++++----------
namespaces/nhdplusv2/comid.csv | 2 +-
.../nhdplusv2/huc12pp/huc12pourpoints.csv | 2 +-
4 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/demo/index.Rmd b/demo/index.Rmd
index ec88aa94..f60b46e4 100644
--- a/demo/index.Rmd
+++ b/demo/index.Rmd
@@ -397,9 +397,9 @@ geom_site <- sf::read_sf("https://geoconnex.us/nmwdi/nmbgmr/wells/NM0028827")
point <- sf::st_sfc(geom_site$geometry)
geom_site <- geom_site$geometry[[1]]
nldi_point<-nhdplusTools::discover_nhdplus_id(point)
-# nldiURL<-"DM = "https://labs.waterdata.usgs.gov/api/nldi/linked-data/nwissite/USGS-08279500/navigate/DM?distance=100"
+# nldiURL<-"DM = "https://api.water.usgs.gov/nldi/linked-data/nwissite/USGS-08279500/navigate/DM?distance=100"
-nldi_query <- URLencode(paste0('https://labs.waterdata.usgs.gov/api/nldi/linked-data/comid/position?f=json&coords=POINT(',geom_site[1],' ',geom_site[2],')'))
+nldi_query <- URLencode(paste0('https://api.water.usgs.gov/nldi/linked-data/comid/position?f=json&coords=POINT(',geom_site[1],' ',geom_site[2],')'))
start <- sf::read_sf(nldi_query)
mainstem <- sf::read_sf(paste0(start$navigation,"/DM/flowlines?distance=250"))
@@ -412,7 +412,7 @@ mapview::mapview(list("Downstream Mainstem"=sf::st_as_sf(sf::st_geometry(mainste
The above code constructs the URLs to call the NLDI service directly, however there are convenience tools in [R](https://usgs-r.github.io/nhdplusTools/index.html) and [Python](https://github.com/cheginit/pynhd) to interact with the NLDI. Below we use the R package `nhdplusTools` to discover data indexed to our downstream mainstem in the NLDI. What features are available from the NLDI?
```{r, message=FALSE, warning=FALSE}
-knitr::kable(fromJSON("https://labs.waterdata.usgs.gov/api/nldi/linked-data"))
+knitr::kable(fromJSON("https://api.water.usgs.gov/nldi/linked-data/"))
```
diff --git a/demo/index.html b/demo/index.html
index a6cc203c..d184a7dd 100644
--- a/demo/index.html
+++ b/demo/index.html
@@ -7992,9 +7992,9 @@ Complementary Tools - the NLDI and API Clients
point <- sf::st_sfc(geom_site$geometry)
geom_site <- geom_site$geometry[[1]]
nldi_point<-nhdplusTools::discover_nhdplus_id(point)
-# nldiURL<-"DM = "https://labs.waterdata.usgs.gov/api/nldi/linked-data/nwissite/USGS-08279500/navigate/DM?distance=100"
+# nldiURL<-"DM = "https://water.usgs.gov/nldi/linked-data/nwissite/USGS-08279500/navigate/DM?distance=100"
-nldi_query <- URLencode(paste0('https://labs.waterdata.usgs.gov/api/nldi/linked-data/comid/position?f=json&coords=POINT(',geom_site[1],' ',geom_site[2],')'))
+nldi_query <- URLencode(paste0('https://water.usgs.gov/nldi/linked-data/comid/position?f=json&coords=POINT(',geom_site[1],' ',geom_site[2],')'))
start <- sf::read_sf(nldi_query)
mainstem <- sf::read_sf(paste0(start$navigation,"/DM/flowlines?distance=250"))
@@ -8003,7 +8003,7 @@ Complementary Tools - the NLDI and API Clients
mapview::mapview(list("Downstream Mainstem"=sf::st_as_sf(sf::st_geometry(mainstem)[within_hu08_13060001$HUC8,])), hcl.colors="blue")
The above code constructs the URLs to call the NLDI service directly, however there are convenience tools in R and Python to interact with the NLDI. Below we use the R package nhdplusTools
to discover data indexed to our downstream mainstem in the NLDI. What features are available from the NLDI?
-knitr::kable(fromJSON("https://labs.waterdata.usgs.gov/api/nldi/linked-data"))
+knitr::kable(fromJSON("https://water.usgs.gov/nldi/linked-data"))
@@ -8059,7 +8059,7 @@ Complementary Tools - the NLDI and API Clients
col.regions = c("white","orange","darkgreen")
)
-
+
map <- mapview::mapview(list("Pecos Headwaters"=convert(within_hu08_13060001$HUC8)), col.regions=c("green"), alpha.regions=0.1) +
mapview::mapview(list("Las Vegas NPDES Points"=convert(npdes)), col.regions="red") + mapview::mapview(list("Las Vegas PWS"=convert(lv)), col.regions="black") +
mapview::mapview(list("Downstream Mainstem"=sf::st_as_sf(sf::st_geometry(mainstem)[within_hu08_13060001$HUC8,])), hcl.colors="blue") +
@@ -8077,7 +8077,7 @@ Complementary Tools - the NLDI and API Clients
map@map %>% leaflet::setView(lng=x, lat=y, zoom=14)
-
+
Browsing around some of the sites available, we see a few:
- NWIS Site GALLINAS RIVER NEAR LOURDES, NM (Site 08382000), at https://waterdata.usgs.gov/monitoring-location/08382000
diff --git a/namespaces/nhdplusv2/comid.csv b/namespaces/nhdplusv2/comid.csv
index 61cae1ee..0889f159 100644
--- a/namespaces/nhdplusv2/comid.csv
+++ b/namespaces/nhdplusv2/comid.csv
@@ -1,2 +1,2 @@
id,target,creator,description
-https://geoconnex.us//nhdplusv2/comid/([0-9]+).*$, https://labs.waterdata.usgs.gov/api/nldi/linked-data/comid/$1, iow, NHDPlusV2 NLDI comids
+https://geoconnex.us//nhdplusv2/comid/([0-9]+).*$, https://api.water.usgs.gov/nldi/linked-data/comid/$1, iow, NHDPlusV2 NLDI comids
diff --git a/namespaces/nhdplusv2/huc12pp/huc12pourpoints.csv b/namespaces/nhdplusv2/huc12pp/huc12pourpoints.csv
index 7229c488..63c4749a 100644
--- a/namespaces/nhdplusv2/huc12pp/huc12pourpoints.csv
+++ b/namespaces/nhdplusv2/huc12pp/huc12pourpoints.csv
@@ -1,2 +1,2 @@
id,target,creator,description
-https://geoconnex.us//nhdplusv2/huc12/([0-9]+)$, https://labs.waterdata.usgs.gov/api/nldi/linked-data/huc12pp/$1, iow, NHDPlusV2 NLDI HUC12
+https://geoconnex.us//nhdplusv2/huc12/([0-9]+)$, https://api.water.usgs.gov/nldi/linked-data/huc12pp/$1, iow, NHDPlusV2 NLDI HUC12
From d1cdc9ed7d246943f85a11dd0a29460ab1ef851b Mon Sep 17 00:00:00 2001
From: David Blodgett
Date: Thu, 12 Dec 2024 14:15:54 -0600
Subject: [PATCH 2/3] labs geoserver urls
---
namespaces/nhdplusv2/reachcode.csv | 2 +-
namespaces/nhdplusv2/wb_comid.csv | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/namespaces/nhdplusv2/reachcode.csv b/namespaces/nhdplusv2/reachcode.csv
index 2ded1622..39ccd366 100644
--- a/namespaces/nhdplusv2/reachcode.csv
+++ b/namespaces/nhdplusv2/reachcode.csv
@@ -1,2 +1,2 @@
id,target,creator,description
-https://geoconnex.us//nhdplusv2/reachcode/([0-9]+).*$, https://labs.waterdata.usgs.gov/geoserver/wmadata/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=wmadata%3Anhdflowline_network&outputFormat=application%2Fjson&cql_filter=reachcode%20=%20%27$1%27, iow, NHDPlusV2 reachcode
+https://geoconnex.us//nhdplusv2/reachcode/([0-9]+).*$, https://api.water.usgs.gov/geoserver/wmadata/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=wmadata%3Anhdflowline_network&outputFormat=application%2Fjson&cql_filter=reachcode%20=%20%27$1%27, iow, NHDPlusV2 reachcode
diff --git a/namespaces/nhdplusv2/wb_comid.csv b/namespaces/nhdplusv2/wb_comid.csv
index 13851d54..e7493718 100644
--- a/namespaces/nhdplusv2/wb_comid.csv
+++ b/namespaces/nhdplusv2/wb_comid.csv
@@ -1,2 +1,2 @@
id,target,creator,description
-https://geoconnex.us//nhdplusv2/nhdwaterbody_comid/([0-9]+).*$, https://labs.waterdata.usgs.gov/geoserver/wmadata/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=wmadata%3Anhdwaterbody&outputFormat=application%2Fjson&cql_filter=comid%20=%20%27$1%27, iow, NHDPlusV2 nhdwaterbody
+https://geoconnex.us//nhdplusv2/nhdwaterbody_comid/([0-9]+).*$, https://api.water.usgs.gov/geoserver/wmadata/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=wmadata%3Anhdwaterbody&outputFormat=application%2Fjson&cql_filter=comid%20=%20%27$1%27, iow, NHDPlusV2 nhdwaterbody
From 2dc3bd311cb7f050239528f2770a4e67ebed0a06 Mon Sep 17 00:00:00 2001
From: David Blodgett
Date: Thu, 12 Dec 2024 14:17:33 -0600
Subject: [PATCH 3/3] about nldi link
---
namespaces/iow/links.csv | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/namespaces/iow/links.csv b/namespaces/iow/links.csv
index 6fe5ec58..d3106853 100644
--- a/namespaces/iow/links.csv
+++ b/namespaces/iow/links.csv
@@ -3,7 +3,7 @@ https://geoconnex.us/iow/homepage, https://internetofwater.org, konda@lincolnins
https://geoconnex.us/iow/aboutus, https://internetofwater.org/who-we-are/, konda@lincolninst.edu, About us
https://geoconnex.us/demo, https://geoconnex.internetofwater.dev/demo, konda@lincolninst.edu, geconnex demo
https://geoconnex.us/iow/sitemap, https://reference.geoconnex.us/stac/sitemap, bwebb@lincolninst.edu, geoconnex sitemap
-https://geoconnex.us/iow/nldi, https://labs.waterdata.usgs.gov/about-nldi/index.html, konda@lincolninst.edu, nldi shortlink
+https://geoconnex.us/iow/nldi, https://waterdata.usgs.gov/blog/nldi-intro/, konda@lincolninst.edu, nldi shortlink
https://geoconnex.us/iow/nldi/demo, https://storymaps.arcgis.com/stories/0ecb1aaf143b4e1981dbe30f38fceec5, konda@lincolninst.edu, nldi demo shortlink
https://geoconnex.us/iow/map, https://gis.cgs.earth/portal/apps/webappviewer/index.html?id=41e8676b373344dfab9733b4d8f32837, konda@lincolninst.edu, geoconnex content map
https://geoconnex.us/iow/cr-demo, https://lincolninstitute.maps.arcgis.com/apps/mapviewer/index.html?webmap=87f4a26d8af24e758b39ec4d137661ac, konda@lincolninst.edu, geoconnex demo map