Skip to content

Commit

Permalink
Fix missing shape locate_bus (#1194)
Browse files Browse the repository at this point in the history
  • Loading branch information
davide-f authored Nov 14, 2024
1 parent 6d45a1a commit 4e8ab04
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1300,6 +1300,9 @@ def locate_bus(
# insert any variable into that place using .format - extract string and filter for those containing co (MA)
point = Point(coords["x"], coords["y"]) # point object

if gdf_co.empty:
return None

try:
return gdf_co[gdf_co.contains(point)][
col
Expand Down

0 comments on commit 4e8ab04

Please sign in to comment.