Skip to main content
Returns a Series containing the distance to aligned other. 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 find the distance to.
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(float)

Examples

We can check the distance of each geometry of GeoSeries to a single 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 use elements with the same index using align=True or ignore index and use elements based on their matching order using align=False: