shapely.equals
shapely.equals#
- equals(a, b, **kwargs)#
Returns 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
- **kwargs
For other keyword-only arguments, see the NumPy ufunc docs.
See also
equals_exact
Check if A and B are structurally equal given a specified tolerance.
Examples
>>> from shapely import GeometryCollection, LineString, Polygon >>> line = LineString([(0, 0), (5, 5), (10, 10)]) >>> equals(line, LineString([(0, 0), (10, 10)])) True >>> equals(Polygon(), GeometryCollection()) True >>> equals(None, None) False