geopandas/dask-geopandas

Overlay function or a way to mimic geopandas overlay

shrikantnaidu opened this issue · 2 comments

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?

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.

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")
    )