Closed jGaboardi closed 5 days ago
@martinfleis the fix here for #74 has cascading effects on triangles.ipynb
. From the last fixed_roads
cell:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
File <timed exec>:1
File [~/github_repos/uscuni/simplification/core/algorithms/triangles.py:249](http://localhost:8888/~/github_repos/uscuni/simplification/core/algorithms/triangles.py#line=248), in resolve(roads, artifacts)
246 case_2(edges, to_drop=to_drop)
248 elif edges.coins_end.sum() == 2 and (edges.coins_count == 1).sum() == 0:
--> 249 case_5(
250 edges,
251 geom=geom,
252 to_drop=to_drop,
253 to_add=to_add,
254 roads=roads,
255 nodes=nodes,
256 )
258 elif edges.coins_end.sum() == 1 and (edges.coins_count == 1).sum() == 0:
259 case_6(edges, to_drop=to_drop)
File [~/github_repos/uscuni/simplification/core/algorithms/triangles.py:126](http://localhost:8888/~/github_repos/uscuni/simplification/core/algorithms/triangles.py#line=125), in case_5(edges, geom, to_drop, to_add, roads, nodes)
124 to_drop.extend(edges[edges.coins_group != main_group].index.to_list())
125 else:
--> 126 to_drop.extend(edges[edges.coins_group != main_group].length.idxmin())
TypeError: 'numpy.int64' object is not iterable
As for a once over comparison of the test plots in the notebook, Case 5.2 is the only one affected.
main
GH73_geometry
Case 5.2 is the only one affected.
mmm, that one should not be affected. We want the output on the left, not the one on the right.
This PR: