This page was generated from 3dhp.ipynb. Interactive online version:
USGS 3DHP#
[1]:
import shapely
from pynhd import HP3D, NLDI
USGS 3DHP web service has five layers: hydrolocation
, flowline
, waterbody
, drainage_area
, and catchment
. Let’s start by getting the closest flowline within a 10 m radius of a point.
[2]:
nhd3d = HP3D("flowline")
point = shapely.Point(-89.441, 43.487)
flw = nhd3d.bygeom(point, distance=10)
flw.explore()
[2]:
Make this Notebook Trusted to load map: File -> Trust Notebook
Next, we use NLDI
to get the basin boundary of a NHD flowline and use it to query different layers of the 3DHP web service.
[3]:
comid = "937070225"
basin = NLDI().get_basins(comid, "comid")
basin.explore()
[3]:
Make this Notebook Trusted to load map: File -> Trust Notebook
[4]:
nhd3d = HP3D("flowline")
network = nhd3d.bygeom(basin.geometry.iloc[0])
network.explore()
[4]:
Make this Notebook Trusted to load map: File -> Trust Notebook