Series of dtype('bool') with value True for
each aligned geometry that contains other.
An object is said to contain other if at least one point of other lies in
the interior and no points of other lie in the exterior of the object.
(Therefore, any given polygon does not contain its own boundary - there is not
any point that lies in the interior.)
If either object is empty, this operation returns False.
This is the inverse of within in the sense that the expression
a.contains(b) == b.within(a) always evaluates to True.
Note: Sedona’s implementation instead returns False for identical geometries.
The operation works on a 1-to-1 row-wise manner.
Signature
Parameters
GeoSeries or geometric object
required
The GeoSeries (elementwise) or geometric object to test if it
is contained.
bool | None (default 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
Series(bool)
This method works in a row-wise manner. It does not check if an element
of one GeoSeries
contains any element of the other one.GeoSeries.contains_properlyGeoSeries.within
Examples
align=True or ignore index and compare elements based on their matching
order using align=False:

