Skip to main content
Returns a GeoSeries of the intersection of points in each aligned geometry with other. The operation works on a 1-to-1 row-wise manner. Note: Unlike most functions, intersection may return the unordered with respect to the index. If this is important to you, you may call sort_index() on the result.

Signature

Parameters

Union[GeoSeries, BaseGeometry]
required
The Geoseries (elementwise) or geometric object to find the intersection with.
Union[bool, None]
default:"None"
If True, automatically aligns GeoSeries based on their indices. None defaults to True. If False, the order of elements is preserved.

Returns

GeoSeries
See also
  • GeoSeries.difference
  • GeoSeries.symmetric_difference
  • GeoSeries.union

Examples

We can also do intersection of each geometry and a single shapely geometry:
We can also check two GeoSeries against each other, row by row. The GeoSeries above have different indices. We can either align both GeoSeries based on index values and compare elements with the same index using align=True or ignore index and compare elements based on their matching order using align=False: