Streamkit Documentation
  • Home
  • API Reference

Examples

  • Downloading Data
  • Aligning NHD Data to DEM
  • Watershed Functions
  • Reach Delineation
  • Stream Network Analysis
  • Cross Sections
Streamkit Documentation
  • Examples
  • Aligning NHD Data to DEM
  • Edit on avkoehl/streamkit

In [1]:
Copied!
import rioxarray as rxr
import geopandas as gpd
import matplotlib.pyplot as plt

from streamkit import rasterize_nhd, flow_accumulation_workflow
import rioxarray as rxr import geopandas as gpd import matplotlib.pyplot as plt from streamkit import rasterize_nhd, flow_accumulation_workflow
OMP: Info #276: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead.
In [2]:
Copied!
flowlines = gpd.read_file("data/sample_nhd.gpkg")
dem = rxr.open_rasterio("data/sample_dem.tif", masked=True).squeeze()
_,flow_dir, _ = flow_accumulation_workflow(dem)
flowlines = gpd.read_file("data/sample_nhd.gpkg") dem = rxr.open_rasterio("data/sample_dem.tif", masked=True).squeeze() _,flow_dir, _ = flow_accumulation_workflow(dem)
In [3]:
Copied!
aligned = rasterize_nhd(flowlines, flow_dir)
aligned = rasterize_nhd(flowlines, flow_dir)
In [4]:
Copied!
aligned.plot()
aligned.plot()
Out[4]:
<matplotlib.collections.QuadMesh at 0x124cbdc10>
No description has been provided for this image
Previous Next

Built with MkDocs using a theme provided by Read the Docs.
avkoehl/streamkit « Previous Next »