shapely.equals_identical#
- equals_identical(a, b, **kwargs)#
Return True if the geometries are identical.
This function verifies whether geometries are pointwise equivalent by checking that the structure, ordering, and values of all vertices are identical in all dimensions.
Similarly to
equals_exact()
, this function uses exact coordinate equality and requires coordinates to be in the same order for all components (vertices, rings, or parts) of a geometry. However, in contrastequals_exact()
, this function does not allow to specify a tolerance, but does require all dimensions to be the same (equals_exact()
ignores the Z and M dimensions), and NaN values are considered to be equal to other NaN values.This function is the vectorized equivalent of scalar equality of geometry objects (
a == b
, i.e.__eq__
).Added in version 2.1.0.
- Parameters:
- a, bGeometry or array_like
Geometry or geometries to check.
- **kwargs
See NumPy ufunc docs for other keyword arguments.
See also
equals_exact
Check if geometries are structurally equal given a specified tolerance.
equals
Check if geometries are spatially (topologically) equal.
Examples
>>> import shapely >>> from shapely import Point >>> shapely.equals_identical(Point(1, 2, 3), Point(1, 2, 3)) True >>> shapely.equals_identical(Point(1, 2, 3), Point(1, 2, 0)) False