@@ -1057,6 +1057,198 @@ def test_CenterlineWidth_futureWarning_functionName():
1057
1057
assert river_class_example .sinuosity == pytest .approx (1.0124452966878812 )
1058
1058
1059
1059
1060
+ def test_CenterlineWidth_futureWarning_variableName ():
1061
+ # Pending Deprecation: TO BE REMOVED
1062
+ with pytest .warns (
1063
+ FutureWarning ,
1064
+ match = re .escape (
1065
+ "optional_cutoff has been replaced with cutoff and will be removed in the future"
1066
+ )):
1067
+ river_class_example = centerline_width .CenterlineWidth (
1068
+ csv_data = csv_data (), optional_cutoff = 10 )
1069
+ assert river_class_example .interpolate_data is False
1070
+ assert river_class_example .interpolate_n == 5
1071
+ assert river_class_example .df_len == 10
1072
+ assert river_class_example .interpolate_n_centerpoints == 10
1073
+ assert river_class_example .df_len == river_class_example .interpolate_n_centerpoints
1074
+ assert river_class_example .ellipsoid == "WGS84"
1075
+ assert river_class_example .left_bank_coordinates == [
1076
+ pytest .approx ([- 92.86856870164004 , 30.03758064742554 ]),
1077
+ pytest .approx ([- 92.86854932864128 , 30.03761289873068 ]),
1078
+ pytest .approx ([- 92.86854615646304 , 30.03764767910492 ]),
1079
+ pytest .approx ([- 92.86853555132092 , 30.03767440933011 ]),
1080
+ pytest .approx ([- 92.8685329553435 , 30.03770236278642 ]),
1081
+ pytest .approx ([- 92.86852225012414 , 30.03772919351539 ]),
1082
+ pytest .approx ([- 92.86851215967346 , 30.0377490549762 ]),
1083
+ pytest .approx ([- 92.86850070336357 , 30.03778301480612 ]),
1084
+ pytest .approx ([- 92.86848128471485 , 30.03781601910584 ]),
1085
+ pytest .approx ([- 92.86847053431237 , 30.03784317873953 ])
1086
+ ]
1087
+ assert river_class_example .right_bank_coordinates == [
1088
+ pytest .approx ([- 92.867475846432 , 30.03744106431763 ]),
1089
+ pytest .approx ([- 92.86747357248916 , 30.03744779451432 ]),
1090
+ pytest .approx ([- 92.86744912321454 , 30.03748158510661 ]),
1091
+ pytest .approx ([- 92.86743200196584 , 30.03750644719021 ]),
1092
+ pytest .approx ([- 92.86743019872144 , 30.03752454918347 ]),
1093
+ pytest .approx ([- 92.8674152219088 , 30.0375426005056 ]),
1094
+ pytest .approx ([- 92.8674007572212 , 30.0375721590616 ]),
1095
+ pytest .approx ([- 92.86738399853574 , 30.03760885519144 ]),
1096
+ pytest .approx ([- 92.86736152540908 , 30.03763647218977 ]),
1097
+ pytest .approx ([- 92.86733658820408 , 30.0376710739572 ])
1098
+ ]
1099
+ assert river_class_example .left_bank_relative_coordinates == [
1100
+ (0.0 , 0.0 ),
1101
+ pytest .approx ((3.5751565498267706 , 1.8685232872800528 )),
1102
+ pytest .approx ((7.430668106736567 , 2.1744787187346564 )),
1103
+ pytest .approx ((10.393796078619014 , 3.1973421235928603 )),
1104
+ pytest .approx ((13.492522825788607 , 3.447722696303108 )),
1105
+ pytest .approx ((16.46679209719587 , 4.4802376180320564 )),
1106
+ pytest .approx ((18.668496614410742 , 5.4534580897883 )),
1107
+ pytest .approx ((22.433048932416597 , 6.5584139868999225 )),
1108
+ pytest .approx ((26.09167847287943 , 8.431334212903316 )),
1109
+ pytest .approx ((29.102408368196336 , 9.468204479555887 ))
1110
+ ]
1111
+ assert river_class_example .right_bank_relative_coordinates == [
1112
+ pytest .approx ((- 15.47271352150741 , 105.40592884424659 )),
1113
+ pytest .approx ((- 14.726648435102671 , 105.62524358470733 )),
1114
+ pytest .approx ((- 10.980834588706166 , 107.98334030850498 )),
1115
+ pytest .approx ((- 8.224779903906521 , 109.63465739390857 )),
1116
+ pytest .approx ((- 6.218116559125793 , 109.80856031565474 )),
1117
+ pytest .approx ((- 4.2170575255238525 , 111.25305312138605 )),
1118
+ pytest .approx ((- 0.9403865325118183 , 112.64813796581723 )),
1119
+ pytest .approx ((3.1275089584774993 , 114.26446962246438 )),
1120
+ pytest .approx ((6.188960842797235 , 116.43196765474976 )),
1121
+ pytest .approx ((10.024698871772665 , 118.8371160736737 ))
1122
+ ]
1123
+ assert river_class_example .right_bank_length == pytest .approx (
1124
+ 0.0291159670403472 )
1125
+ assert river_class_example .left_bank_length == pytest .approx (
1126
+ 0.03091855487702919 )
1127
+ assert river_class_example .area == pytest .approx (3.1320671725985596 )
1128
+ assert river_class_example .starting_node == pytest .approx (
1129
+ (- 92.86792843577895 , 30.037755468515407 ))
1130
+ assert river_class_example .ending_node == pytest .approx (
1131
+ (- 92.86801289742837 , 30.03752504557166 ))
1132
+ assert river_class_example .x_voronoi_ridge_point == [
1133
+ pytest .approx ((- 92.86792843577895 , - 92.86797730665528 )),
1134
+ pytest .approx ((- 92.86792843577895 , - 92.86763066313195 )),
1135
+ pytest .approx ((- 92.86800558484293 , - 92.8679831604442 )),
1136
+ pytest .approx ((- 92.86800558484293 , - 92.86800742482134 )),
1137
+ pytest .approx ((- 92.86797730665528 , - 92.8679831604442 )),
1138
+ pytest .approx ((- 92.86800742482134 , - 92.86836579067878 )),
1139
+ pytest .approx ((- 92.86801289742837 , - 92.86800742482134 ))
1140
+ ]
1141
+ assert river_class_example .y_voronoi_ridge_point == [
1142
+ pytest .approx ((30.037755468515407 , 30.037632240539036 )),
1143
+ pytest .approx ((30.037755468515407 , 30.037587198340198 )),
1144
+ pytest .approx ((30.037556089755398 , 30.037616220602295 )),
1145
+ pytest .approx ((30.037556089755398 , 30.03754989867807 )),
1146
+ pytest .approx ((30.037632240539036 , 30.037616220602295 )),
1147
+ pytest .approx ((30.03754989867807 , 30.037662199505217 )),
1148
+ pytest .approx ((30.03752504557166 , 30.03754989867807 ))
1149
+ ]
1150
+ assert river_class_example .starting_node_relative == pytest .approx (
1151
+ (19.37962855169771 , 61.75347314188457 ))
1152
+ assert river_class_example .ending_node_relative == pytest .approx (
1153
+ (- 6.163506358375243 , 53.60729340259522 ))
1154
+ assert river_class_example .x_voronoi_ridge_point_relative == [
1155
+ pytest .approx ((19.37962855169771 , 5.719402714977766 )),
1156
+ pytest .approx ((19.37962855169771 , 0.7265597682606407 )),
1157
+ pytest .approx ((- 2.722159670063122 , 3.943540534289469 )),
1158
+ pytest .approx ((- 2.722159670063122 , - 3.4084605052625445 )),
1159
+ pytest .approx ((5.719402714977766 , 3.943540534289469 )),
1160
+ pytest .approx ((- 3.4084605052625445 , 9.040316297491838 )),
1161
+ pytest .approx ((- 6.163506358375243 , - 3.4084605052625445 ))
1162
+ ]
1163
+ assert river_class_example .y_voronoi_ridge_point_relative == [
1164
+ pytest .approx ((61.75347314188457 , 57.03996061049505 )),
1165
+ pytest .approx ((61.75347314188457 , 90.47371913953327 )),
1166
+ pytest .approx ((54.31257503764738 , 56.47537260188891 )),
1167
+ pytest .approx ((54.31257503764738 , 54.1351126169003 )),
1168
+ pytest .approx ((57.03996061049505 , 56.47537260188891 )),
1169
+ pytest .approx ((54.1351126169003 , 19.57072693253479 )),
1170
+ pytest .approx ((53.60729340259522 , 54.1351126169003 ))
1171
+ ]
1172
+ assert river_class_example .centerline_voronoi == [
1173
+ pytest .approx ((- 92.86792843577895 , 30.037755468515407 )),
1174
+ pytest .approx ((- 92.86797730665528 , 30.037632240539036 )),
1175
+ pytest .approx ((- 92.8679831604442 , 30.037616220602295 )),
1176
+ pytest .approx ((- 92.86800558484293 , 30.037556089755398 )),
1177
+ pytest .approx ((- 92.86800742482134 , 30.03754989867807 )),
1178
+ pytest .approx ((- 92.86801289742837 , 30.03752504557166 ))
1179
+ ]
1180
+ assert river_class_example .centerline_length == pytest .approx (
1181
+ 0.0268358436902184 )
1182
+ assert river_class_example .equal_distance == 10
1183
+ assert river_class_example .centerline_equal_distance == [
1184
+ pytest .approx ((- 92.86792843577895 , 30.037755468515407 )),
1185
+ pytest .approx ((- 92.86796225513369 , 30.0376701930044 )),
1186
+ pytest .approx ((- 92.8679947819878 , 30.03758453771908 ))
1187
+ ]
1188
+ assert river_class_example .centerline_evenly_spaced == [
1189
+ pytest .approx ((- 92.86792843577895 , 30.037755468515407 )),
1190
+ pytest .approx ((- 92.86793850025879 , 30.037730090916774 )),
1191
+ pytest .approx ((- 92.86794856473864 , 30.037704713318142 )),
1192
+ pytest .approx ((- 92.86795862921848 , 30.03767933571951 )),
1193
+ pytest .approx ((- 92.86796869369832 , 30.037653958120877 )),
1194
+ pytest .approx ((- 92.8679786579938 , 30.037628542360324 )),
1195
+ pytest .approx ((- 92.86798811587208 , 30.03760293266184 )),
1196
+ pytest .approx ((- 92.86799765519947 , 30.03757735303128 )),
1197
+ pytest .approx ((- 92.86800689722405 , 30.037551673913928 )),
1198
+ pytest .approx ((- 92.86801289742837 , 30.03752504557166 ))
1199
+ ]
1200
+ assert river_class_example .centerline_smoothed == [
1201
+ pytest .approx ((- 92.86792864517531 , 30.03775552495917 )),
1202
+ pytest .approx ((- 92.86793830351385 , 30.037730038227725 )),
1203
+ pytest .approx ((- 92.86794834164479 , 30.037704658553707 )),
1204
+ pytest .approx ((- 92.8679585709002 , 30.037679328615422 )),
1205
+ pytest .approx ((- 92.8679688026121 , 30.037653991091172 )),
1206
+ pytest .approx ((- 92.86797884811266 , 30.037628588659278 )),
1207
+ pytest .approx ((- 92.86798851873392 , 30.03760306399804 )),
1208
+ pytest .approx ((- 92.86799762580799 , 30.03757735978578 )),
1209
+ pytest .approx ((- 92.86800598066694 , 30.037551418700797 )),
1210
+ pytest .approx ((- 92.86801339464283 , 30.037525183421394 ))
1211
+ ]
1212
+ assert river_class_example .centerline_voronoi_relative == [
1213
+ pytest .approx ((19.37962855169771 , 61.75347314188457 )),
1214
+ pytest .approx ((5.719402714977766 , 57.03996061049505 )),
1215
+ pytest .approx ((3.943540534289469 , 56.47537260188891 )),
1216
+ pytest .approx ((- 2.722159670063122 , 54.31257503764738 )),
1217
+ pytest .approx ((- 3.4084605052625445 , 54.1351126169003 )),
1218
+ pytest .approx ((- 6.163506358375243 , 53.60729340259522 ))
1219
+ ]
1220
+ assert river_class_example .centerline_equal_distance_relative == [
1221
+ pytest .approx ((19.37962855169771 , 61.75347314188457 )),
1222
+ pytest .approx ((9.926557886575461 , 58.491655396579134 )),
1223
+ pytest .approx ((0.43138978280792034 , 55.35449383456564 ))
1224
+ ]
1225
+ assert river_class_example .centerline_evenly_spaced_relative == [
1226
+ pytest .approx ((19.37962855169771 , 61.75347314188457 )),
1227
+ pytest .approx ((16.566438223196965 , 60.782772210259715 )),
1228
+ pytest .approx ((13.75324799118586 , 59.81207078062485 )),
1229
+ pytest .approx ((10.940057853530279 , 58.8413688592248 )),
1230
+ pytest .approx ((8.126867813965323 , 57.87066644099266 )),
1231
+ pytest .approx ((5.309447553845384 , 56.90962631910795 )),
1232
+ pytest .approx ((2.4705290187939486 , 55.99742969527903 )),
1233
+ pytest .approx ((- 0.36505634661324626 , 55.07737682589534 )),
1234
+ pytest .approx ((- 3.211669900810025 , 54.185998374970055 )),
1235
+ pytest .approx ((- 6.163506358375243 , 53.60729340259522 ))
1236
+ ]
1237
+ assert river_class_example .centerline_smoothed_relative == [
1238
+ pytest .approx ((19.38588540411508 , 61.73327688441957 )),
1239
+ pytest .approx ((16.56059758465421 , 60.801748243230456 )),
1240
+ pytest .approx ((13.747177300992124 , 59.83358816671705 )),
1241
+ pytest .approx ((10.939270373724167 , 58.84699365006703 )),
1242
+ pytest .approx ((8.130522617001684 , 57.8601617063664 )),
1243
+ pytest .approx ((5.314579839859855 , 56.89128935609742 )),
1244
+ pytest .approx ((2.4850878432378534 , 55.95857364348811 )),
1245
+ pytest .approx ((- 0.3643075754810865 , 55.08021162834345 )),
1246
+ pytest .approx ((- 3.2399606268696415 , 54.27440038709772 )),
1247
+ pytest .approx ((- 6.148225524463743 , 53.55933701482967 ))
1248
+ ]
1249
+ assert river_class_example .sinuosity == pytest .approx (1.0008911599991046 )
1250
+
1251
+
1060
1252
def test_CenterlineWidth_default_incrementalSinuosity ():
1061
1253
river_class_example = centerline_width .CenterlineWidth (csv_data = csv_data ())
1062
1254
assert river_class_example .incremental_sinuosity () == {
0 commit comments