shapely.equals#
- equals(a, b, **kwargs)#
Return True if A and B are spatially equal.
If A is within B and B is within A, A and B are considered equal. The ordering of points can be different.
- Parameters:
- a, bGeometry or array_like
Geometry or geometries to check.
- **kwargs
See NumPy ufunc docs for other keyword arguments.
See also
equals_exactCheck if A and B are structurally equal given a specified tolerance.
Examples
>>> import shapely >>> from shapely import GeometryCollection, LineString, Polygon >>> line = LineString([(0, 0), (5, 5), (10, 10)]) >>> shapely.equals(line, LineString([(0, 0), (10, 10)])) True >>> shapely.equals(Polygon(), GeometryCollection()) True >>> shapely.equals(None, None) False