Geopandas geom_almost_equals method gives wrong output

Copying my answer from GitHub.

geoframe1.geom_almost_equals(geoframe2, decimal=5) works row-wise. It aligns both GeoSeries and checks if geometries almost equal for each row.

In your case, the first checks with the first which is True since both are equal. Second checks with second, which is False, because they are different. Third checks with None.

Therefore you have [True, False, False] which naturally returns a single row.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top