Overlay function or a way to mimic geopandas overlay
shrikantnaidu opened this issue · 2 comments
shrikantnaidu commented
Firstly, is the overlay function available? I'm not able to find it in the doc. Also, is there a way to do the exact thing overlay does with sjoin function?
martinfleis commented
It is not available at the moment. See #217 (comment) for more details.
Also, is there a way to do the exact thing overlay does with sjoin function?
No, sjoin does not affect the geometries.
Oreilles commented
There is a way to emulate overlay
with the current API:
def overlay(left, right):
return (
left.sjoin(right.assign(right_geometry=right.geometry))
.assign(geometry=lambda x: x.geometry.intersection(x.right_geometry))
.drop(columns="right_geometry")
)