overlay(df1, df2, how='intersection', make_valid=True, keep_geom_type=True)¶
Perform spatial overlay between two polygons.
Currently only supports data GeoDataFrames with polygons. Implements several methods that are all effectively subsets of the union.
- df1GeoDataFrame with MultiPolygon or Polygon geometry column
- df2GeoDataFrame with MultiPolygon or Polygon geometry column
Method of spatial overlay: ‘intersection’, ‘union’, ‘identity’, ‘symmetric_difference’ or ‘difference’.
If True, return only geometries of the same geometry type as df1 has, if False, return all resulting gemetries.
GeoDataFrame with new set of polygons and attributes resulting from the overlay