Tools to derive HUC-cropped DEMs from common DEM datasets
Project description
DEM to basin preprocessing
This preprocessing library takes source 1-meter digital elevation model (DEM) data and splits, crops, buffers, and reprojects it to individual hydrologic basins (identified by their unique identifier, the "HUC12" ID).
This preprocessing script also produces ancillary data products corresponding to each new HUC12 DEM raster to describe their sub-basins (ie "catchments"), their streams (ie "flowlines"), and the roughness of each streambed.
Taken together, these are the major inputs needed to run GeoFlood, which creates short-term flood projections.
Alpha-release Python library
The underlying Python library is available on PyPi and can be installed by:
pip install dem2basin
Main Python script
The recommended way to run dem2basin.py
:
python3 dem2basin.py \
--shapefile study_area_polygon.shp \
--huc12 WBD-HUC12s.shp \
--nhd NHD_catchments_and_flowlines.gdb/ \
--raster TNRIS-LIDAR-Datasets/ \
--availability TNRIS-LIDAR-Dataset_availability.shp \
--directory HUC12-DEM_outputs/ \
--restart dem2basin-study_area.pickle
Required source data inputs
There are 5 required inputs.
--shapefile
Study area polygon vector GIS file: a vector GIS file of a single polygon which defines the study area--huc12
USGS Watershed Boundary Dataset (WBD): a HUC12 vector GIS file from USGS's WBD or a subset of the WBD--nhd
NHD Medium Resolution (MR): a GeoDataBase of NHD MR catchments and flowlines--raster
TNRIS Lidar: the parent directory to a collection of TNRIS Lidar datasets--availability
TNRIS Lidar availability: a vector GIS file of TNRIS Lidar availability, provided by TNRIS here
Optional parameters
--directory
Outputs directory: a directory to store outputs, which will each be sorted by HUC12--restart
Restart file: a Python Pickle file from which you can restart the preprocessing if it's interrupted--overwrite
Overwrite flag: optional flag to overwrite all files found in output directory--overwrite_rasters
Overwrite rasters flag: optional flag to overwrite just the raster outputs--overwrite_flowlines
Overwrite flowlines flag: optional flag to overwrite just the flowline outputs--overwrite_catchments
Overwrite catchments flag: optional flag to overwrite just the catchment outputs--overwrite_roughnesses
Overwrite roughness table flag: optional flag to overwrite the roughness table--log
Log file: a file to store runtime log
Description of outputs
There are 4 outputs per HUC12.
- Cropped & buffered DEM:
- buffered 500m
- cropped to each HUC12 intersecting the study area
- at least 1m resolution
- mosaicked with preference for lowest resolution tiles
- reprojected to the study area's projections
- corresponding NHD MR flowlines:
- subset of NHD MR flowlines
- each flowline's median point along the line lies within the HUC12
- reprojected to the study area's projections
- corresponding NHD MR catchments:
- subset of NHD MR catchments
- correspond with the NHD MR flowlines above
- reprojected to the study area's projections
- Manning's n roughness table:
- organized by flowline using their ComIDs
- vary by stream order
Here is an example of these outputs, originally visualized by Prof David Maidment.
Already preprocessed DEMs
Already preprocessed DEMs are now available for the vast majority of Texas's HUC12s if you are a TACC user. You can request a TACC account here.
Notes about preprocessed DEMs
- The DEMs are not provided for any HUC12s that have any gap in 1m resolution data.
- All of the DEMS are reprojected to WGS 84 / UTM 14N, even if the HUC12 is outside of UTM 14.
Where to find them
The DEMs are located on Stampede2 at /scratch/projects/tnris/dhl-flood-modelling/TX-HUC12-DEM_outputs
.
If you run into trouble
Please submit a ticket if you have trouble accessing this data. You may also contact me directly at @dhardestylewis or dhl@tacc.utexas.edu
Available preprocessed HUC12s
These HUC12 DEMs are available right now on Stampede2.
Confirmed successfully preprocessed HUC12s
These HUC12 DEMs have been successfully preprocessed in the past, and will soon be available once again on Stampede2. If you need any of these right now, please contact me.
Preprocessing workflow
If you would like an understanding of the preprocessing workflow, I provide a simplified but representative example in this Jupyter notebook. This Jupyter notebook was presented at the inaugural TACC Institute on Planet Texas 2050 Cyberecosystem Tools in August, 2020. Please contact me if you would like a recording.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dem2basin-0.9.0.1.tar.gz
.
File metadata
- Download URL: dem2basin-0.9.0.1.tar.gz
- Upload date:
- Size: 38.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c76ff1ecb1b40877159730fd7c5a25e4d8851dbf086484497d2b1349edd4a085 |
|
MD5 | a1e78527d5726e2367a4aed00e1fe03e |
|
BLAKE2b-256 | 4661bd25f35da5035482131470d2c4378d5030a90c684e3b72f726f74957f581 |
File details
Details for the file dem2basin-0.9.0.1-py3-none-any.whl
.
File metadata
- Download URL: dem2basin-0.9.0.1-py3-none-any.whl
- Upload date:
- Size: 35.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 546f78b7ab70c1680588dba59068fc1a0ef19d67a722eb096a35a09a85cdeb81 |
|
MD5 | f6198d8a9ba8972d44c15e1ce0ac8437 |
|
BLAKE2b-256 | fca239bf9af02360429ad3fb75d2181182b5c7da889bdad66c001a977b44e20c |