Skip to content

Commit

Permalink
base_network: bugfix - bring voronoi cells in correct order
Browse files Browse the repository at this point in the history
  • Loading branch information
fneum authored Aug 4, 2024
1 parent 7a16dd2 commit ddf0da2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/base_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ def voronoi(points, outline, crs=4326):
voronoi = gpd.GeoDataFrame(geometry=voronoi)
joined = gpd.sjoin_nearest(pts, voronoi, how="right")

return joined.dissolve(by="Bus").squeeze()
return joined.dissolve(by="Bus").reindex(points.index).squeeze()


def build_bus_shapes(n, country_shapes, offshore_shapes, countries):
Expand Down

0 comments on commit ddf0da2

Please sign in to comment.