Skip to content

Commit f928cb2

Browse files
committed
centerlineSmoothedRelative -> centerline_smoothed_relative
1 parent 8ae4d79 commit f928cb2

7 files changed

+17
-13
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ The red pins represent the equal distance centerline coordinates produced by cen
237237
* centerline_voronoi_relative (list of tuples): List of the relative distance coordinates of the centerline generated by Voronoi diagrams
238238
* centerline_equal_distance_relative (list of tuples): List of the relative distance coordinates of the centerline generated by equal distances between coordinates from the Voronoi diagrams
239239
* centerline_evenly_spaced_relative (list of tuples): List of the relative distance coordinates of the centerline generated by evenly spacing out points generated by the Voronoi diagrams
240-
* 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
240+
* centerline_smoothed_relative (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
241241

242242
<details closed>
243243
<summary><b>Object (class) additional attributes:</b> (Click to view all)</summary>
@@ -323,7 +323,7 @@ Centerline coordinates are formed from Smoothed vertices
323323
```
324324
river_object.centerline_smoothed
325325
```
326-
| river_object.centerline_smoothed | river_object.centerlineSmoothedRelative |
326+
| river_object.centerline_smoothed | river_object.centerline_smoothed_relative |
327327
| ------------- | ------------- |
328328
| ![centerlineEvenlySpaced+png](https://raw.githubusercontent.com/cyschneck/centerline-width/main/data/doc_examples/smoothed_centerline.png) | ![centerlineEvenlySpacedRelative+png](https://raw.githubusercontent.com/cyschneck/centerline-width/main/data/doc_examples/smoothed_centerline_relative.png) |
329329

centerline_width/plotDiagrams.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def plotCenterlineBackend(
124124
if coordinate_unit == "Decimal Degrees":
125125
centerline_coordinates_by_type = river_object.centerline_smoothed
126126
if coordinate_unit == "Relative Distance":
127-
centerline_coordinates_by_type = river_object.centerlineSmoothedRelative
127+
centerline_coordinates_by_type = river_object.centerline_smoothed_relative
128128

129129
# Plot the centerline coordinates
130130
if centerline_coordinates_by_type:
@@ -339,7 +339,7 @@ def plot_centerline_width(
339339
if coordinate_unit == "Decimal Degrees":
340340
smoothed_coords = river_object.centerline_smoothed
341341
if coordinate_unit == "Relative Distance":
342-
smoothed_coords = river_object.centerlineSmoothedRelative
342+
smoothed_coords = river_object.centerline_smoothed_relative
343343
for k, v in smoothed_coords:
344344
x.append(k)
345345
y.append(v)

centerline_width/pytests/test_verifyRiverCenterlineClass.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ def test_CenterlineWidth_default():
544544
pytest.approx((-3.242532102266962, 54.17801808352102)),
545545
pytest.approx((-6.163506358375243, 53.60729340259522))
546546
]
547-
assert river_class_example.centerlineSmoothedRelative == [
547+
assert river_class_example.centerline_smoothed_relative == [
548548
pytest.approx((73.52246060342735, 72.49167057298256)),
549549
pytest.approx((70.47686340416793, 72.89719088368028)),
550550
pytest.approx((67.46092539809182, 73.13889337599008)),
@@ -2019,7 +2019,7 @@ def test_CenterlineWidth_interpolateTrue():
20192019
pytest.approx((-3.136784877238625, 54.20536200865886)),
20202020
pytest.approx((-6.163506358375243, 53.60729340259522))
20212021
]
2022-
assert river_class_example.centerlineSmoothedRelative == [
2022+
assert river_class_example.centerline_smoothed_relative == [
20232023
pytest.approx((76.63553244637076, 71.97906499637598)),
20242024
pytest.approx((73.46054425852371, 72.56088597649791)),
20252025
pytest.approx((70.31707172940611, 72.95911928491681)),

centerline_width/riverCenterlineClass.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ def __init__(self,
185185
self.centerlineSmoothed = centerline_width.smoothedCoordinates(
186186
river_object=self,
187187
centerline_coordinates=self.centerline_evenly_spaced,
188-
interprolate_num=self.interpolate_n_centerpoints)
188+
interprolate_num=self.interpolate_n_centerpoints
189+
) # Pending Deprecation
189190
self.centerline_smoothed = centerline_width.smoothedCoordinates(
190191
river_object=self,
191192
centerline_coordinates=self.centerline_evenly_spaced,
@@ -214,6 +215,9 @@ def __init__(self,
214215
self.ellipsoid)
215216

216217
self.centerlineSmoothedRelative = centerline_width.relativeCenterlineCoordinates(
218+
self.left_bank_coordinates[0], self.centerline_smoothed,
219+
self.ellipsoid) # Pending Deprecation
220+
self.centerline_smoothed_relative = centerline_width.relativeCenterlineCoordinates(
217221
self.left_bank_coordinates[0], self.centerline_smoothed,
218222
self.ellipsoid)
219223

centerline_width/saveOutput.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def save_centerline_csv(river_object: centerline_width.CenterlineWidth = None,
6868
if centerline_type == "Evenly Spaced":
6969
centerline_coordinates_by_type = river_object.centerline_evenly_spaced_relative
7070
if centerline_type == "Smoothed":
71-
centerline_coordinates_by_type = river_object.centerlineSmoothedRelative
71+
centerline_coordinates_by_type = river_object.centerline_smoothed_relative
7272

7373
# set default latitude/longitude headers
7474
if coordinate_unit == "Decimal Degrees":
@@ -131,7 +131,7 @@ def save_centerline_mat(river_object: centerline_width.CenterlineWidth = None,
131131
if centerline_type == "Evenly Spaced":
132132
centerline_coordinates_by_type = river_object.centerline_evenly_spaced_relative
133133
if centerline_type == "Smoothed":
134-
centerline_coordinates_by_type = river_object.centerlineSmoothedRelative
134+
centerline_coordinates_by_type = river_object.centerline_smoothed_relative
135135

136136
# .mat files do not allow for spaces or special characters in the header
137137
# convert spaces/special characters to underscores

river_centerline_width_example.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@
4949
river.centerline_equal_distance_relative))
5050
print("centerline_evenly_spaced_relative = {0}".format(
5151
river.centerline_evenly_spaced_relative))
52+
print("centerline_smoothed_relative = {0}".format(
53+
river.centerline_smoothed_relative))
5254
'''
5355
print("Centerline Length = {0} m".format(river.centerlineLength * 1000))
5456
print("ellipsoid = {0}".format(river.ellipsoid))
55-
print("centerlineSmoothedRelative = {0}".format(
56-
river.centerlineSmoothedRelative))
5757
print(river.right_bank_relative_coordinates)
5858
print(river.left_bank_relative_coordinates)
5959
'''

river_centerline_width_example_deprecation.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@
5050
river.centerlineEqualDistanceRelative))
5151
print("centerlineEvenlySpacedRelative = {0}".format(
5252
river.centerlineEvenlySpacedRelative))
53+
print("centerlineSmoothedRelative = {0}".format(
54+
river.centerlineSmoothedRelative))
5355
'''
5456
print("Centerline Length = {0} m".format(river.centerlineLength * 1000))
5557
print("ellipsoid = {0}".format(river.ellipsoid))
56-
print("centerlineSmoothedRelative = {0}".format(
57-
river.centerlineSmoothedRelative))
5858
print(river.right_bank_relative_coordinates)
5959
print(river.left_bank_relative_coordinates)
6060
'''

0 commit comments

Comments
 (0)