Skip to main content
Returns true when two geometries have identical geometry types, component and coordinate ordering, dimensional layouts, and coordinate values. Every available coordinate dimension participates in the comparison, including Z and M. Corresponding NaN ordinates compare equal. SRID, precision model, and user data are not compared. Unlike ST_Equals, this function checks representation rather than two-dimensional topological equality. Unlike ST_EqualsExact, it compares Z and M and does not accept a tolerance.

Signatures

Parameters

Geometry
required
The first geometry.
Geometry
required
The second geometry.

Return type

Returns true when the geometry representations are identical, false otherwise, or NULL if either input is NULL.
The comparison uses the dimensions retained by the input geometry values. It checks geometric content, not a byte-for-byte encoding. Compare SRIDs separately when CRS identity is also required.

Visual examples

Structure and coordinate order

The inputs are shown separately so their traversal direction and container structure are easy to compare. Geometries can occupy the same locations and still be non-identical when their vertex order, geometry type, or nesting differs. ST_EqualsIdentical compares geometry structure and coordinate order

Z, M, and ZM dimensions

The coordinate layout is part of a geometry’s identity. POINT Z (1 2 3) and POINT M (1 2 3) contain the same numeric values, but the third ordinate has a different role. For ZM geometries, both the Z and M values participate in the comparison. ST_EqualsIdentical compares every X, Y, Z, and M ordinate

Examples

Identical geometries

Coordinate values and dimensional roles

Changing a Z value makes the geometries non-identical. An XYZ point and an XYM point are also non-identical even when their numeric values match.

Coordinate order

Reversing a line preserves its shape but changes its coordinate order.