Skip to content

Polish

King, Jonathan M requested to merge ghsc/users/jking/pfdf:qol into main

Summary

This merge requests adds a variety of small(ish) quality-of-life features to the code. This is intended to be the final merge before the v1.0 release.

Closes #28 (closed), #34 (closed), #37 (closed), #40 (closed), #41 (closed), #42 (closed), #43 (closed), #46 (closed), #51 (closed), #52 (closed), #54 (closed), #55 (closed), #57 (closed), #58 (closed)

Notes for Reviewer

The diffs probably won't be very useful for this one (particularly for the segments module), as I've moved various functions around and made small changes to many docstrings. I'd suggest focusing on the following areas:

  • pfdf.utils.driver is new
  • pfdf.raster.Raster.from_array has two new options: "spatial" and "casting"
  • The docstring of pfdf.raster.Raster.save now provides information for working with file format drivers
  • Several changes in pfdf.segments.Segments
    • The "TERMINOLOGY" section of the docstring has been reworked (start here)
    • Now tracks network connectivity. (Lines 695-707 and 2190-2209)
    • Added functions for locating terminal outlets (Lines 952-995),
    • The raster function now includes options for drainage basins,
    • The docstrings of summary and basin_summary have been reworked

Changelog

  • Updated the license to GPLv3, as required by dependencies
  • Added a module with info on supported file formats
  • Added spatial metadata and NoData casting options when creating Rasters
  • Added "burned" as an option for making severity masks
  • Segments now record network connectivity and can be set to preserve connectivity when filtering
  • Segments now support outlet basins
  • Segments supports statistics that ignore NaN and NoData values
  • Validation method no longer copy arrays
Edited by King, Jonathan M

Merge request reports