Skip to main content

HydroSurvey Tools

This is a groundup rewrite using modern pydata tools of algorithms originally described in my 2011 SciPy Talk - Improving efficiency and repeatability of lake volume estimates using Python.

Installation

  1. Download this code with git or download a zip file (click the green code icon) and unzip
  2. Download and install pixi from https://prefix.dev/
  3. Open a cmd/terminal window and navigate to the folder that contains this software
  4. run pixi install to install the software

Usage

  1. Open a cmd/terminal window in the folder with the code
  2. run pixi shell in the terminal to activate the environment
  3. now you will have a tool called hstools, if you type hstools you will get a help message.
  4. hstools new-config <config.toml> will help you created a new config file with a guided wizard
  5. hstools interpolate-lake <config.toml> will run the interpolation
  6. hstools compute-eac <dem.tif> <output.csv> will create an elevation area capacity table from a dem
  7. hstools gui launches a gui version of the tool

Anisotropic Elliptical Inverse Distance Weighting (AEIDW) Lake Interpolation Algorithm

Input files and parameters required

  • CSV file with survey data, fields: x-coord, y-coord, current surface elevation, preimpoundment elevation (optional)
    • elevation: lake elevation at the boundary
    • max segment length: this is used to add more vertices to the centerline to improve interpolation accuracy
  • Shapefile of Lake boundary at a particular elevation. Elevation value set in the attribute table
  • Interpolation Centerline Shapefile: This defines the direction of interpolation in a particular polygon
    • polygon id: foreign key used to math centerlines with polygons
    • max segment lenght: this is used to add more vertices to the centerline to improve interpolation accuracy
  • Interpolation Polygons Shapefile, in the attribute table the following values are set for each polygon
    • polygon id: foreign key used to connect polygons to centerlines
    • grid spacing: density of generated target points in each polygon that the survey data is interpolated to
    • priority: priority of the polygon, when polygons overlap target points in the overlap region use survey points from the higher priority polygon
    • interpolation method: type of interpolation used in the polygon (currently AEIDW or CONSTANT)
    • interpolation params: parameters needed by interpolation methos (currently ellipsivity for AEIDW or elevation value for CONSTANT)
    • Polygon Buffer: Use some survey data in the buffer region around the polygon to avoid interpolation artifacts near the polygon boundaries
    • nearest nieghbors: how many neighbors to include in the interpolation to each target point

Algorithm

The essential idea of AEIDW algorithm is that along channel bathymetric depths are likely to be more similar to each other than across channel. So we transform the data into a coordinate system that follows the channel and then scale the across channel coordinate by an ellipsivity factor. After this we do a regular inverse distance wieghting. Since the across channel points are now further away, this causes the interpolation to weight along channel survey data higher than across channel survey data.

  1. Add boundary data to survey data
  2. iterate through polygons
  3. Generate target points in each polygon
  4. Convert survey data and target points in each polygon into "S-N" coordinates, where S=distance along centerline and N-perpendicular distance from centerline
  5. Multiply "N" coordinate by "ellipsivity" factor.
  6. Interpolate data using Inverse Distance Weighting algorithm
  7. merge the target points with the original survey data

Metadata

Release files for hydrosurvey 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hydrosurvey 0.4.1
File Size Uploaded
hydrosurvey-0.4.1.tar.gz 79.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for hydrosurvey 0.4.1
File Interpreter ABI Platform
hydrosurvey-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 79.7 MB

Release files / hydrosurvey-0.4.1.tar.gz

Download URL hydrosurvey-0.4.1.tar.gz
Size 79.7 MB
Tags Source
SHA-256 checksum
How to use checksums
849aa35bc7f78fac313e1c877e159eee6f2040b26b654c2421eaeeb0ef9cea3f
BLAKE2b-256 checksum
How to use checksums
de0e0333f97ae7c54b55dbec4b890b67e5d40482b448bf98d004ad017bfd6bf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / hydrosurvey-0.4.1-py3-none-any.whl

Download URL hydrosurvey-0.4.1-py3-none-any.whl
Size 34.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a4b9070891a2026df5350abff3d3dce88e855e23066bbb41eb0bf4ad45139a8
BLAKE2b-256 checksum
How to use checksums
92b33d8a233e2ebd5685c3a1209b318c97f810e17d60ef2df8bae074236c0d88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page