Skip to content

Commit 4cd9460

Browse files
committed
leftBankLength -> left_bank_length
1 parent 84ef631 commit 4cd9460

6 files changed

+22
-16
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ Find the centerline and width of rivers based on the latitude and longitude posi
2727
* centerline_smoothed
2828
* **Return river features**
2929
* centerline_length
30-
* rightBankLength
31-
* leftBankLength
30+
* right_bank_length
31+
* left_bank_length
3232
* area
3333
* sinuosity
3434
* incremental_sinuosity()
@@ -230,8 +230,8 @@ The red pins represent the equal distance centerline coordinates produced by cen
230230
* centerline_evenly_spaced (list of tuples): List of the latitude and longitude coordinates of the centerline generated by evenly spacing out points generated by the Voronoi diagrams
231231
* centerline_smoothed (list of tuples): List of the latitude and longitude coordinates of the centerline generated by smoothing out the evenly spaced-out points generated by the Voronoi diagrams
232232
* centerline_length (float): Length of the centerline of the river (in km)
233-
* rightBankLength (float): Length of the right bank of the river (in km)
234-
* leftBankLength (float): Length of the left bank of the river (in km)
233+
* right_bank_length (float): Length of the right bank of the river (in km)
234+
* 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
237237
* centerlineVoronoiRelative (list of tuples): List of the relative distance coordinates of the centerline generated by Voronoi diagrams

centerline_width/pytests/test_verifyRiverCenterlineClass.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,9 @@ def test_CenterlineWidth_default():
239239
pytest.approx((69.70659214132293, 133.54671863851024)),
240240
pytest.approx((74.46421931823045, 133.19494595720758))
241241
]
242-
assert river_class_example.rightBankLength == pytest.approx(
242+
assert river_class_example.right_bank_length == pytest.approx(
243243
0.09705816897006408)
244-
assert river_class_example.leftBankLength == pytest.approx(
244+
assert river_class_example.left_bank_length == pytest.approx(
245245
0.10570962276643736)
246246
assert river_class_example.area == pytest.approx(11.4030195647527)
247247
assert river_class_example.starting_node == pytest.approx(
@@ -1548,9 +1548,9 @@ def test_CenterlineWidth_interpolateTrue():
15481548
pytest.approx((74.46421931823045, 133.19494595720758)),
15491549
pytest.approx((74.46421931823045, 133.19494595720758))
15501550
]
1551-
assert river_class_example.rightBankLength == pytest.approx(
1551+
assert river_class_example.right_bank_length == pytest.approx(
15521552
0.09705816897212159)
1553-
assert river_class_example.leftBankLength == pytest.approx(
1553+
assert river_class_example.left_bank_length == pytest.approx(
15541554
0.1057096227682203)
15551555
assert river_class_example.area == pytest.approx(11.403019517285152)
15561556
assert river_class_example.starting_node == pytest.approx(

centerline_width/pytests/test_verifyRiverFeatures.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ def test_riverFeatures_centerlineLength():
116116

117117

118118
def test_riverFeatures_rightBankLength():
119-
assert river_class_example.rightBankLength == pytest.approx(
119+
assert river_class_example.right_bank_length == pytest.approx(
120120
0.09705816897006408)
121121

122122

123123
def test_riverFeatures_leftBankLength():
124-
assert river_class_example.leftBankLength == pytest.approx(
124+
assert river_class_example.left_bank_length == pytest.approx(
125125
0.10570962276643736)
126126

127127

centerline_width/riverCenterlineClass.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,15 @@ def __init__(self,
8080

8181
# Right/Length Bank Length
8282
self.rightBankLength = centerline_width.centerlineLength(
83+
centerline_coordinates=right_bank_coordinates,
84+
ellipsoid=self.ellipsoid) # Pending Deprecation
85+
self.right_bank_length = centerline_width.centerlineLength(
8386
centerline_coordinates=right_bank_coordinates,
8487
ellipsoid=self.ellipsoid)
8588
self.leftBankLength = centerline_width.centerlineLength(
89+
centerline_coordinates=left_bank_coordinates,
90+
ellipsoid=self.ellipsoid) # Pending Deprecation
91+
self.left_bank_length = centerline_width.centerlineLength(
8692
centerline_coordinates=left_bank_coordinates,
8793
ellipsoid=self.ellipsoid)
8894

@@ -151,7 +157,7 @@ def __init__(self,
151157
# Centerline length
152158
self.centerlineLength = centerline_width.centerlineLength(
153159
centerline_coordinates=shortest_path_coordinates,
154-
ellipsoid=self.ellipsoid)
160+
ellipsoid=self.ellipsoid) # Pending Deprecation
155161
self.centerline_length = centerline_width.centerlineLength(
156162
centerline_coordinates=shortest_path_coordinates,
157163
ellipsoid=self.ellipsoid)

river_centerline_width_example.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
print("centerline_evenly_spaced = {0}".format(
4141
river.centerline_evenly_spaced))
4242
print("centerline_smoothed = {0}".format(river.centerline_smoothed))
43-
print("\nCenterline Length = {0} km".format(river.centerlineLength))
43+
print("\nCenterline Length = {0} km".format(river.centerline_length))
44+
print("Right Bank Length = {0} km".format(river.right_bank_length))
45+
print("Left Bank Length = {0} km".format(river.left_bank_length))
4446
'''
4547
print("Centerline Length = {0} m".format(river.centerlineLength * 1000))
46-
print("Right Bank Length = {0} km".format(river.rightBankLength))
47-
print("Left Bank Length = {0} km".format(river.leftBankLength))
4848
print("ellipsoid = {0}".format(river.ellipsoid))
4949
print("centerlineVoronoiRelative = {0}".format(
5050
river.centerlineVoronoiRelative))

river_centerline_width_example_deprecation.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
print("centerlineEvenlySpaced = {0}".format(river.centerlineEvenlySpaced))
4343
print("centerlineSmoothed = {0}".format(river.centerlineSmoothed))
4444
print("\nCenterline Length = {0} km".format(river.centerlineLength))
45-
'''
46-
print("Centerline Length = {0} m".format(river.centerlineLength * 1000))
4745
print("Right Bank Length = {0} km".format(river.rightBankLength))
4846
print("Left Bank Length = {0} km".format(river.leftBankLength))
47+
'''
48+
print("Centerline Length = {0} m".format(river.centerlineLength * 1000))
4949
print("ellipsoid = {0}".format(river.ellipsoid))
5050
print("centerlineVoronoiRelative = {0}".format(
5151
river.centerlineVoronoiRelative))

0 commit comments

Comments
 (0)