Skip to content

Commit f6a9775

Browse files
committed
centerlineVoronoiRelative -> centerline_voronoi_relative
1 parent 4cd9460 commit f6a9775

7 files changed

+14
-11
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ The red pins represent the equal distance centerline coordinates produced by cen
234234
* left_bank_length (float): Length of the left bank of the river (in km)
235235
* area (float): Area contained within river bank polygon (in km^2)
236236
* sinuosity (float): Sinuosity of the river based on evenly spaced centerline coordinates
237-
* centerlineVoronoiRelative (list of tuples): List of the relative distance coordinates of the centerline generated by Voronoi diagrams
237+
* centerline_voronoi_relative (list of tuples): List of the relative distance coordinates of the centerline generated by Voronoi diagrams
238238
* centerlineEqualDistanceRelative (list of tuples): List of the relative distance coordinates of the centerline generated by equal distances between coordinates from the Voronoi diagrams
239239
* centerlineEvenlySpacedRelative (list of tuples): List of the relative distance coordinates of the centerline generated by evenly spacing out points generated by the Voronoi diagrams
240240
* centerlineSmoothedRelative (list of tuples): List of the relative distance coordinates of the centerline generated by smoothing out the evenly spaced out points generated by the Voronoi diagrams
@@ -299,7 +299,7 @@ Centerline coordinates are formed by the Voronoi vertices
299299
```
300300
river_object.centerline_voronoi
301301
```
302-
| river_object.centerline_voronoi | river_object.centerlineVoronoiRelative |
302+
| river_object.centerline_voronoi | river_object.centerline_voronoi_relative |
303303
| ------------- | ------------- |
304304
| ![centerlineVoronoi+png](https://raw.githubusercontent.com/cyschneck/centerline-width/main/data/doc_examples/voronoi_centerline.png) | ![centerlineVoronoiRelative+png](https://raw.githubusercontent.com/cyschneck/centerline-width/main/data/doc_examples/voronoi_centerline_relative.png) |
305305

centerline_width/plotDiagrams.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def plotCenterlineBackend(
103103
if coordinate_unit == "Decimal Degrees":
104104
centerline_coordinates_by_type = river_object.centerline_voronoi
105105
if coordinate_unit == "Relative Distance":
106-
centerline_coordinates_by_type = river_object.centerlineVoronoiRelative
106+
centerline_coordinates_by_type = river_object.centerline_voronoi_relative
107107

108108
if centerline_type == "Equal Distance":
109109
centerline_legend = "Equal Distance Centerline Coordinates"

centerline_width/pytests/test_verifyRiverCenterlineClass.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ def test_CenterlineWidth_default():
479479
pytest.approx((-92.86800440657967, 30.03755104077941)),
480480
pytest.approx((-92.86801062016116, 30.037525395801037))
481481
]
482-
assert river_class_example.centerlineVoronoiRelative == [
482+
assert river_class_example.centerline_voronoi_relative == [
483483
pytest.approx((73.47047894946884, 72.32036803406206)),
484484
pytest.approx((66.19109452005578, 73.01861616268259)),
485485
pytest.approx((65.91411844882091, 73.04069054140477)),
@@ -1945,7 +1945,7 @@ def test_CenterlineWidth_interpolateTrue():
19451945
pytest.approx((-92.86800423779859, 30.037552027025324)),
19461946
pytest.approx((-92.86801078861649, 30.03752549183515))
19471947
]
1948-
assert river_class_example.centerlineVoronoiRelative == [
1948+
assert river_class_example.centerline_voronoi_relative == [
19491949
pytest.approx((76.55076830013083, 72.09093998499534)),
19501950
pytest.approx((74.6098789520801, 72.23550251163009)),
19511951
pytest.approx((73.4721576636839, 72.32834938994927)),

centerline_width/riverCenterlineClass.py

+3
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,9 @@ def __init__(self,
189189

190190
# Relative Distance from bottom left bank point to each Centerline coordinates
191191
self.centerlineVoronoiRelative = centerline_width.relativeCenterlineCoordinates(
192+
self.left_bank_coordinates[0], self.centerline_voronoi,
193+
self.ellipsoid) # Pending Deprecation
194+
self.centerline_voronoi_relative = centerline_width.relativeCenterlineCoordinates(
192195
self.left_bank_coordinates[0], self.centerline_voronoi,
193196
self.ellipsoid)
194197
self.centerlineEqualDistanceRelative = centerline_width.relativeCenterlineCoordinates(

centerline_width/saveOutput.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def save_centerline_csv(river_object: centerline_width.CenterlineWidth = None,
6262
centerline_coordinates_by_type = river_object.centerline_smoothed
6363
if coordinate_unit == "Relative Distance":
6464
if centerline_type == "Voronoi":
65-
centerline_coordinates_by_type = river_object.centerlineVoronoiRelative
65+
centerline_coordinates_by_type = river_object.centerline_voronoi_relative
6666
if centerline_type == "Equal Distance":
6767
centerline_coordinates_by_type = river_object.centerlineEqualDistanceRelative
6868
if centerline_type == "Evenly Spaced":
@@ -125,7 +125,7 @@ def save_centerline_mat(river_object: centerline_width.CenterlineWidth = None,
125125
centerline_coordinates_by_type = river_object.centerline_smoothed
126126
if coordinate_unit == "Relative Distance":
127127
if centerline_type == "Voronoi":
128-
centerline_coordinates_by_type = river_object.centerlineVoronoiRelative
128+
centerline_coordinates_by_type = river_object.centerline_voronoi_relative
129129
if centerline_type == "Equal Distance":
130130
centerline_coordinates_by_type = river_object.centerlineEqualDistanceRelative
131131
if centerline_type == "Evenly Spaced":

river_centerline_width_example.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
print("\nCenterline Length = {0} km".format(river.centerline_length))
4444
print("Right Bank Length = {0} km".format(river.right_bank_length))
4545
print("Left Bank Length = {0} km".format(river.left_bank_length))
46+
print("centerline_voronoi_relative = {0}".format(
47+
river.centerline_voronoi_relative))
4648
'''
4749
print("Centerline Length = {0} m".format(river.centerlineLength * 1000))
4850
print("ellipsoid = {0}".format(river.ellipsoid))
49-
print("centerlineVoronoiRelative = {0}".format(
50-
river.centerlineVoronoiRelative))
5151
print("equalDistanceCenterlineRelative = {0}".format(
5252
river.centerlineEqualDistanceRelative))
5353
print("centerlineEvenlySpacedRelative = {0}".format(

river_centerline_width_example_deprecation.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@
4444
print("\nCenterline Length = {0} km".format(river.centerlineLength))
4545
print("Right Bank Length = {0} km".format(river.rightBankLength))
4646
print("Left Bank Length = {0} km".format(river.leftBankLength))
47+
print("centerlineVoronoiRelative = {0}".format(
48+
river.centerlineVoronoiRelative))
4749
'''
4850
print("Centerline Length = {0} m".format(river.centerlineLength * 1000))
4951
print("ellipsoid = {0}".format(river.ellipsoid))
50-
print("centerlineVoronoiRelative = {0}".format(
51-
river.centerlineVoronoiRelative))
5252
print("equalDistanceCenterlineRelative = {0}".format(
5353
river.centerlineEqualDistanceRelative))
5454
print("centerlineEvenlySpacedRelative = {0}".format(

0 commit comments

Comments
 (0)