-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update README.md for sinuosity functions, incremental_points=100 defa…
…ults
- Loading branch information
Showing
2 changed files
with
33 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ Find the centerline and width of rivers based on the latitude and longitude posi | |
* leftBankLength | ||
* riverArea | ||
* riverSinuosity | ||
* calculateIncrementalSinuosity() | ||
* **Export centerline to .CSV and .MAT files** | ||
* saveCenterlineCSV() | ||
* saveCenterlineMAT() | ||
|
@@ -226,6 +227,7 @@ The red pins represent the equal distance centerline coordinates produced by cen | |
* rightBankLength (float): Length of the right bank of the river (in km) | ||
* leftBankLength (float): Length of the left bank of the river (in km) | ||
* riverArea (float): Area contained within river bank polygon (in km^2) | ||
* riverSinuosity (float): Sinuosity of the river based on evenly spaced centerline coordinates | ||
* centerlineVoronoiRelative (list of tuples): List of the relative distance coordinates of the centerline generated by Voronoi diagrams | ||
* centerlineEqualDistanceRelative (list of tuples): List of the relative distance coordinates of the centerline generated by equal distances between coordinates from the Voronoi diagrams | ||
* centerlineEvenlySpacedRelative (list of tuples): List of the relative distance coordinates of the centerline generated by evenly spacing out points generated by the Voronoi diagrams | ||
|
@@ -392,6 +394,36 @@ river_area = river_object.riverArea | |
``` | ||
The area of the river returns `334.0398585246558` km^2 | ||
|
||
### Total Sinuosity of River | ||
Return the total sinuosity of the river | ||
``` | ||
river_object.riverSinuosity | ||
``` | ||
Sinuosity of river based on the evenly spaced centerline coordinates | ||
```python | ||
import centerline_width | ||
river_object = centerline_width.riverCenterline(csv_data="data/river_coords.csv") | ||
river_area = river_object.riverSinuosity | ||
``` | ||
The sinuosity of the river returns as a float `0.6852533956654481` | ||
|
||
### Incremental Sinuosity of River | ||
Return the incremental sinuosity of the river at evenly spaced increments | ||
``` | ||
calculateIncrementalSinuosity( | ||
incremental_points = 100, | ||
save_to_csv = None) | ||
``` | ||
* **[REQUIRED]** incremental_points: grouping of centerline coordinates, defaults to 100 (must be less than the length of the evenly spaced centerline coordinates) | ||
* [OPTIONAL] save_to_csv (string): CSV filename, requires a .csv extension with headers `["Centerline Latitude Start (Deg)", "Centerline Longitude Start (Deg)", "Centerline Latitude End (Deg)", "Centerline Longitude End (Deg)", "Sinuosity"]` | ||
|
||
```python | ||
import centerline_width | ||
river_object = centerline_width.riverCenterline(csv_data="data/river_coords.csv") | ||
river_object.river.calculateIncrementalSinuosity() | ||
``` | ||
Returns a dictionary with the start and end centerline coordinates and associated sinuosity `{((-92.87803465419134, 30.04494734395193), (-92.87718084516158, 30.03944640478984)): 0.8164574107802118, ((-92.87714797109666, 30.03944945940497), (-92.87020323809925, 30.039886265891074)): 0.9810773013508994}` | ||
|
||
## Plot Centerline in Matplotlib | ||
Plot the centerline created from a list of right and left banks | ||
|
||
|
@@ -780,8 +812,6 @@ python -m pytest | |
## Beta :test_tube: Features | ||
These features are not included in pip install because they are still experimental and being tested/debugged. For more information and getting them up and running, contact [email protected] or [email protected] or post a question as a [Github Issue](https://github.com/cyschneck/centerline-width/issues) | ||
|
||
- Calculate sinuosity of river, in total and in equal parts | ||
|
||
- Calculate the dominant meander wavelength amd its variance | ||
|
||
- Research and Contribute to [OpenStreetMap](https://github.com/cyschneck/centerline-width/issues/5) for existing mapped rivers with generated centerlines | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters