From ea25244cca11e7984bc16b2a89819d9c90b73aaf Mon Sep 17 00:00:00 2001 From: Morten Letnes Date: Mon, 23 Oct 2023 22:16:16 +0200 Subject: [PATCH] dropna first. Only raised error in linux --- src/sgis/geopandas_tools/centerlines.py | 2 +- tests/test_centerline.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sgis/geopandas_tools/centerlines.py b/src/sgis/geopandas_tools/centerlines.py index 9b4e607f..9e30baef 100644 --- a/src/sgis/geopandas_tools/centerlines.py +++ b/src/sgis/geopandas_tools/centerlines.py @@ -110,8 +110,8 @@ def get_rough_centerlines( length_now = end_to_end.length end_to_end = ( end_to_end.intersection(geoms.buffer(precision)) - .loc[lambda x: x.length > length_now * 0.9] .dropna() + .loc[lambda x: x.length > length_now * 0.9] ) # straight end buffer to remove all in between ends diff --git a/tests/test_centerline.py b/tests/test_centerline.py index e819fe36..40ccfc4a 100644 --- a/tests/test_centerline.py +++ b/tests/test_centerline.py @@ -69,7 +69,6 @@ def test_get_centerline(): centerlines = sg.get_rough_centerlines(roads, 10) sg.qtm(roads, centerlines) - print("\n\n\nhei") df = gpd.read_parquet(Path(__file__).parent / "testdata" / "gaps.parquet") for i in [50, 20, 5]: centerlines = sg.get_rough_centerlines(df, i)