Skip to content

1.6.0 - riverArea, account for curvature of Earth, flip_direction

Compare
Choose a tag to compare
@cyschneck cyschneck released this 25 Apr 03:27
· 60 commits to main since this release

Update to Back End for plotCenterlineWidth()

Update accounts for the curvature of the Earth when calculating the slope for width with plotCenterlineWidth()

Previously, slopes were calculated based on transect_span_distance without accounting for the curvature of the planet. Updated functionality now accounts for the curvature of the planet (defined by ellipsoid, defaults to WGS84). Adjusts positions where width lines intersect banks.

Previous (left) and updated (right) places where width lines intersect bank

original_left

Area of River

Return the area contained within the polygon generated the left and right bank latitude/longitudes

river_object.riverArea

Area returned in kilometers^2

import centerline_width
river_object = centerline_width.riverCenterline(csv_data="data/river_coords.csv")
river_area = river_object.riverArea

Code Coverage

New code coverage and testing to track back end of repo

Expanding pytests to coverage existing functionality for centerline and widths (~93%) error handling and expected outputs

Backwards Compatibility Conflicts

convertColumnsToCSV() argument flipBankDirection changed to flip_direction to be consistent with snake-case variable naming conventions among other functions

Drops active support for Python 3.9 in support of NEP 29

Bug fixes and README.md edits

Pytests: Tests for Python 3.10, 3.11, 3.12 against Ubuntu, macOS, Windows