Skip to content

Commit

Permalink
Merge pull request #337 from rl-institut/fix/geopandas_future_warning
Browse files Browse the repository at this point in the history
Replace deprecated op parameter with predicate
  • Loading branch information
MaGering authored Sep 11, 2023
2 parents c8d06b7 + 63c7aa1 commit 59dac6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oemof_b3/tools/geo.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def add_region_to_register(register, regions):
register["coordinates"] = list(zip(register.lon, register.lat))
register["coordinates"] = register["coordinates"].apply(Point)
register_gdf = gpd.GeoDataFrame(register, geometry="coordinates", crs=4326)
new_register_gdf = gpd.sjoin(register_gdf, regions, op="within")
new_register_gdf = gpd.sjoin(register_gdf, regions, predicate="within")
new_register = pd.DataFrame(new_register_gdf)

return new_register

0 comments on commit 59dac6d

Please sign in to comment.