bento.geo.overlay

bento.geo.overlay(sdata, s1, s2, name, how='intersection', make_valid=True, instance_map_type='1to1')

Overlay two shape elements in a SpatialData object and store the result as a new shape element.

Parameters:
  • sdata (SpatialData) – SpatialData object containing the shape elements

  • s1 (str) – Name of the first shape element

  • s2 (str) – Name of the second shape element

  • name (str) – Name of the new shape element to be created

  • how (str, optional) – Type of overlay operation to perform. Options are “intersection”, “union”, “difference”, “symmetric_difference”, by default “intersection”

  • make_valid (bool, optional) – If True, correct invalid geometries with GeoPandas, by default True

  • instance_map_type (str, optional) – Type of instance mapping to use. Options are “1to1”, “1tomany”, by default “1to1”.

Returns:

The function modifies the input SpatialData object in-place

Return type:

None