Skip to content

Commit

Permalink
v0.2.3 release with centerline coordinate options
Browse files Browse the repository at this point in the history
  • Loading branch information
cyschneck committed May 26, 2023
1 parent 9cdda43 commit ac539bc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,26 +196,27 @@ river_object = centerline_width.riverCenterline(csv_data="data/river_coords.csv"

### Return Latitude/Longitude Coordinates of Centerline
Return the latitude/longitude coordinates of the centerline based on the left and right banks

**Types of Centerlines**
There are three centerline coordinates that can be formed from the data, that can have a some degree of difference from one another
- Voronoi centerline: centerline generated from where Voronoi vertices intersect within the river
There are three types of centerline coordinates formed from the river bank data. Each are built off of eachother and are used to clean and smooth data
- **Voronoi centerline**: centerline generated from where Voronoi vertices intersect within the river
![example+png](https://raw.githubusercontent.com/cyschneck/river-geometry/main/data/doc_examples/voronoi_centerline.png)
- Evenly Spaced Centerline: centerline based on Voronoi centerline but evenly spaced with a fixed number of points
- **Evenly Spaced Centerline**: centerline based on Voronoi centerline but evenly spaced with a fixed number of points
![example+png](https://raw.githubusercontent.com/cyschneck/river-geometry/main/data/doc_examples/evenly_spaced_centerline.png)
- Smoothed Centerline: centerline generated from the evenly spaced centerline but smoothed by a b-spline
- **Smoothed Centerline**: centerline generated from the evenly spaced centerline but smoothed by a b-spline
![example+png](https://raw.githubusercontent.com/cyschneck/river-geometry/main/data/doc_examples/smoothed_centerline.png)

Centerline coordinates are formed from Voronoi vertices
Centerline coordinates are formed by the Voronoi vertices
```
river_object.centerlineVoronoi
```

Centerline coordinates are formed from Evenly Spaced vertices
Centerline coordinates are formed by Evenly Spaced Voronoi vertices
```
river_object.centerlineEvenlySpaced
```

Centerline coordinates are formed from Smoothed vertices
Centerline coordinates are formed from Smoothed Voronoi vertices
```
river_object.centerlineSmoothed
```
Expand Down Expand Up @@ -243,7 +244,7 @@ river_object = centerline_width.riverCenterline(csv_data="data/river_coords.csv"
river_object.saveCenterlineCSV(save_to_csv="centerline_coordinates.csv", centerline_type="Smoothed")
```

Returns a csv with the Latitude and Longitude coordinates of the specified centerline with column headers: `"<centerline_type_specified> Centerline Latitude (Deg), <centerline_type_specified> Centerline Longitude (Deg)` (for example: `Smoothed Centerline Latitude (Deg), Smoothed Centerline Longitude (Deg)`)
Returns a csv with the Latitude and Longitude coordinates of the specified centerline with column headers with centerline type: `Smoothed Centerline Latitude (Deg), Smoothed Centerline Longitude (Deg)`

### Return Length of Centerline
Return the length of the centerline found between the left and right bank generated by the Voronoi diagram
Expand Down Expand Up @@ -278,7 +279,7 @@ river_object = centerline_width.riverCenterline(csv_data="data/river_coords.csv"
river_object.plotCenterline(display_all_possible_paths=False, display_voronoi=False)
```
Output:
![river_coords_centerline+png](https://raw.githubusercontent.com/cyschneck/river-geometry/main/data/river_coords_centerline.png)
![river_coords_centerline+png](https://raw.githubusercontent.com/cyschneck/river-geometry/main/data/doc_examples/river_coords_centerline.png)

## Plot Centerline Width Lines in Matplotlib
### Plot the Centerline Width Lines
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Python Package Setup
from setuptools import setup, find_namespace_packages

VERSION="0.2.2"
VERSION="0.2.3"
DESCRIPTION="A Python package to find the centerline and width of rivers based on the latitude and longitude of the right and left bank"

with open("README.md", "r") as f:
Expand Down

0 comments on commit ac539bc

Please sign in to comment.