From fbac2133105e876acc98fbd7f8f7f48edaa71203 Mon Sep 17 00:00:00 2001 From: Martin Fleischmann Date: Tue, 10 Dec 2024 12:56:48 +0100 Subject: [PATCH] BUG: fix Wuhan crash --- neatnet/nodes.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/neatnet/nodes.py b/neatnet/nodes.py index 726ed99..57a2cc9 100644 --- a/neatnet/nodes.py +++ b/neatnet/nodes.py @@ -368,8 +368,7 @@ def _rotate_loop_coords( loop_points.geometry, predicate="dwithin", distance=1e-4 ) - _shared_node = loop_points.loc[loop_points_ix].geometry.get_coordinates().values - new_start = np.unique(_shared_node, axis=0) + new_start = loop_points.loc[loop_points_ix].geometry.mode().get_coordinates().values _coords_match = (loop_coords == new_start).all(axis=1) new_start_idx = np.where(_coords_match)[0].squeeze()