Skip to content

Commit

Permalink
Fixing gis index error caused by linked index objects in gis.intersect
Browse files Browse the repository at this point in the history
  • Loading branch information
kbonney committed Aug 7, 2024
1 parent 7f3e51d commit df13390
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wntr/gis/geospatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def intersect(A, B, B_value=None, include_background=False, background_value=0):

n = intersects.groupby('_tmp_index_name')['geometry'].count()
B_indices = intersects.groupby('_tmp_index_name')['index_right'].apply(list)
stats = pd.DataFrame(index=A.index, data={'intersections': B_indices,
stats = pd.DataFrame(index=A.index.copy(), data={'intersections': B_indices,
'n': n,})
stats['n'] = stats['n'].fillna(0)
stats['n'] = stats['n'].apply(int)
Expand Down

0 comments on commit df13390

Please sign in to comment.