Skip to content

Commit

Permalink
dropna first. Only raised error in linux
Browse files Browse the repository at this point in the history
  • Loading branch information
mortewle committed Oct 23, 2023
1 parent 2b30b84 commit ea25244
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/sgis/geopandas_tools/centerlines.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion tests/test_centerline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ea25244

Please sign in to comment.