Skip to content

Commit 8ae4d79

Browse files
committed
centerlineEvenlySpacedRelative -> centerline_evenly_spaced_relative
1 parent c8dc973 commit 8ae4d79

7 files changed

+24
-15
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ The red pins represent the equal distance centerline coordinates produced by cen
236236
* sinuosity (float): Sinuosity of the river based on evenly spaced centerline coordinates
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
239-
* centerlineEvenlySpacedRelative (list of tuples): List of the relative distance coordinates of the centerline generated by evenly spacing out points generated by the Voronoi diagrams
239+
* 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
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
241241

242242
<details closed>
@@ -315,7 +315,7 @@ Centerline coordinates are formed by Evenly Spaced vertices, set by `interpolate
315315
```
316316
river_object.centerline_evenly_spaced
317317
```
318-
| river_object.centerline_evenly_spaced | river_object.centerlineEvenlySpacedRelative |
318+
| river_object.centerline_evenly_spaced | river_object.centerline_evenly_spaced_relative |
319319
| ------------- | ------------- |
320320
| ![centerlineEvenlySpaced+png](https://raw.githubusercontent.com/cyschneck/centerline-width/main/data/doc_examples/evenly_spaced_centerline.png) | ![centerlineEvenlySpacedRelative+png](https://raw.githubusercontent.com/cyschneck/centerline-width/main/data/doc_examples/evenly_spaced_centerline_relative.png) |
321321

centerline_width/plotDiagrams.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def plotCenterlineBackend(
117117
if coordinate_unit == "Decimal Degrees":
118118
centerline_coordinates_by_type = river_object.centerline_evenly_spaced
119119
if coordinate_unit == "Relative Distance":
120-
centerline_coordinates_by_type = river_object.centerlineEvenlySpacedRelative
120+
centerline_coordinates_by_type = river_object.centerline_evenly_spaced_relative
121121

122122
if centerline_type == "Smoothed":
123123
centerline_legend = "Smoothed Centerline Coordinates"

centerline_width/pytests/test_verifyRiverCenterlineClass.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ def test_CenterlineWidth_default():
502502
pytest.approx((-3.4084605052625445, 54.1351126169003)),
503503
pytest.approx((-6.163506358375243, 53.60729340259522)),
504504
]
505-
assert river_class_example.centerlineEqualDistanceRelative == [
505+
assert river_class_example.centerline_equal_distance_relative == [
506506
pytest.approx((73.47047894946884, 72.32036803406206)),
507507
pytest.approx((63.50393050487748, 73.13762693464152)),
508508
pytest.approx((53.508195776029744, 72.84558714881928)),
@@ -513,7 +513,7 @@ def test_CenterlineWidth_default():
513513
pytest.approx((6.039076670446599, 57.15074732117381)),
514514
pytest.approx((-3.5642236371955707, 54.362087572923194))
515515
]
516-
assert river_class_example.centerlineEvenlySpacedRelative == [
516+
assert river_class_example.centerline_evenly_spaced_relative == [
517517
pytest.approx((73.47047894946884, 72.32036803406206)),
518518
pytest.approx((70.49436362993764, 72.6058408175882)),
519519
pytest.approx((67.51824832917079, 72.8913137541397)),
@@ -1977,7 +1977,7 @@ def test_CenterlineWidth_interpolateTrue():
19771977
pytest.approx((-3.4084605052625445, 54.1351126169003)),
19781978
pytest.approx((-6.163506358375243, 53.60729340259522))
19791979
]
1980-
assert river_class_example.centerlineEqualDistanceRelative == [
1980+
assert river_class_example.centerline_equal_distance_relative == [
19811981
pytest.approx((76.55076830013083, 72.09093998499534)),
19821982
pytest.approx((66.59044719216097, 72.9808857261491)),
19831983
pytest.approx((56.592933814925935, 73.20387960632621)),
@@ -1988,7 +1988,7 @@ def test_CenterlineWidth_interpolateTrue():
19881988
pytest.approx((8.958270139623515, 58.16146519825169)),
19891989
pytest.approx((-0.539383038040768, 55.03183517073071))
19901990
]
1991-
assert river_class_example.centerlineEvenlySpacedRelative == [
1991+
assert river_class_example.centerline_evenly_spaced_relative == [
19921992
pytest.approx((76.55076830013083, 72.09093998499534)),
19931993
pytest.approx((73.4584665012726, 72.32956453464425)),
19941994
pytest.approx((70.37172724666243, 72.6176042594705)),

centerline_width/riverCenterlineClass.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ def __init__(self,
164164

165165
# Set the different types of Centerline coordinates
166166
self.equal_distance = equal_distance
167+
167168
self.centerlineEqualDistance = centerline_width.equalDistanceCenterline(
168169
centerline_coordinates=self.centerline_voronoi,
169170
equal_distance=self.equal_distance,
@@ -172,12 +173,15 @@ def __init__(self,
172173
centerline_coordinates=self.centerline_voronoi,
173174
equal_distance=self.equal_distance,
174175
ellipsoid=self.ellipsoid)
176+
175177
self.centerlineEvenlySpaced = centerline_width.evenlySpacedCenterline(
176178
centerline_coordinates=self.centerline_voronoi,
177-
number_of_fixed_points=self.interpolate_n_centerpoints)
179+
number_of_fixed_points=self.interpolate_n_centerpoints
180+
) # Pending Deprecation
178181
self.centerline_evenly_spaced = centerline_width.evenlySpacedCenterline(
179182
centerline_coordinates=self.centerline_voronoi,
180183
number_of_fixed_points=self.interpolate_n_centerpoints)
184+
181185
self.centerlineSmoothed = centerline_width.smoothedCoordinates(
182186
river_object=self,
183187
centerline_coordinates=self.centerline_evenly_spaced,
@@ -194,15 +198,21 @@ def __init__(self,
194198
self.centerline_voronoi_relative = centerline_width.relativeCenterlineCoordinates(
195199
self.left_bank_coordinates[0], self.centerline_voronoi,
196200
self.ellipsoid)
201+
197202
self.centerlineEqualDistanceRelative = centerline_width.relativeCenterlineCoordinates(
198203
self.left_bank_coordinates[0], self.centerline_equal_distance,
199204
self.ellipsoid) # Pending Deprecation
200205
self.centerline_equal_distance_relative = centerline_width.relativeCenterlineCoordinates(
201206
self.left_bank_coordinates[0], self.centerline_equal_distance,
202207
self.ellipsoid)
208+
203209
self.centerlineEvenlySpacedRelative = centerline_width.relativeCenterlineCoordinates(
210+
self.left_bank_coordinates[0], self.centerline_evenly_spaced,
211+
self.ellipsoid) # Pending Deprecation
212+
self.centerline_evenly_spaced_relative = centerline_width.relativeCenterlineCoordinates(
204213
self.left_bank_coordinates[0], self.centerline_evenly_spaced,
205214
self.ellipsoid)
215+
206216
self.centerlineSmoothedRelative = centerline_width.relativeCenterlineCoordinates(
207217
self.left_bank_coordinates[0], self.centerline_smoothed,
208218
self.ellipsoid)

centerline_width/saveOutput.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def save_centerline_csv(river_object: centerline_width.CenterlineWidth = None,
6666
if centerline_type == "Equal Distance":
6767
centerline_coordinates_by_type = river_object.centerline_equal_distance_relative
6868
if centerline_type == "Evenly Spaced":
69-
centerline_coordinates_by_type = river_object.centerlineEvenlySpacedRelative
69+
centerline_coordinates_by_type = river_object.centerline_evenly_spaced_relative
7070
if centerline_type == "Smoothed":
7171
centerline_coordinates_by_type = river_object.centerlineSmoothedRelative
7272

@@ -129,7 +129,7 @@ def save_centerline_mat(river_object: centerline_width.CenterlineWidth = None,
129129
if centerline_type == "Equal Distance":
130130
centerline_coordinates_by_type = river_object.centerline_equal_distance_relative
131131
if centerline_type == "Evenly Spaced":
132-
centerline_coordinates_by_type = river_object.centerlineEvenlySpacedRelative
132+
centerline_coordinates_by_type = river_object.centerline_evenly_spaced_relative
133133
if centerline_type == "Smoothed":
134134
centerline_coordinates_by_type = river_object.centerlineSmoothedRelative
135135

river_centerline_width_example.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,11 @@
4747
river.centerline_voronoi_relative))
4848
print("centerline_equal_distance_relative = {0}".format(
4949
river.centerline_equal_distance_relative))
50+
print("centerline_evenly_spaced_relative = {0}".format(
51+
river.centerline_evenly_spaced_relative))
5052
'''
5153
print("Centerline Length = {0} m".format(river.centerlineLength * 1000))
5254
print("ellipsoid = {0}".format(river.ellipsoid))
53-
54-
print("centerlineEvenlySpacedRelative = {0}".format(
55-
river.centerlineEvenlySpacedRelative))
5655
print("centerlineSmoothedRelative = {0}".format(
5756
river.centerlineSmoothedRelative))
5857
print(river.right_bank_relative_coordinates)

river_centerline_width_example_deprecation.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@
4848
river.centerlineVoronoiRelative))
4949
print("equalDistanceCenterlineRelative = {0}".format(
5050
river.centerlineEqualDistanceRelative))
51+
print("centerlineEvenlySpacedRelative = {0}".format(
52+
river.centerlineEvenlySpacedRelative))
5153
'''
5254
print("Centerline Length = {0} m".format(river.centerlineLength * 1000))
5355
print("ellipsoid = {0}".format(river.ellipsoid))
54-
print("centerlineEvenlySpacedRelative = {0}".format(
55-
river.centerlineEvenlySpacedRelative))
5656
print("centerlineSmoothedRelative = {0}".format(
5757
river.centerlineSmoothedRelative))
5858
print(river.right_bank_relative_coordinates)

0 commit comments

Comments
 (0)