equalsExactGeom method

bool equalsExactGeom(
  1. Geometry other
)

Returns true if the two Geometrys are exactly equal. Two Geometries are exactly equal iff:

  • they have the same structure
  • they have the same values for their vertices, in exactly the same order.
This provides a stricter test of equality than {@link #equalsTopo(Geometry)}, which is more useful in certain situations (such as using geometries as keys in collections).

This method does not test the values of the GeometryFactory, the SRID, or the userData fields.

To properly test equality between different geometries, it is usually necessary to {@link #normalize()} them first.

@param other the Geometry with which to compare this Geometry @return true if this and the other Geometry have identical structure and point values.

@see #equalsExact(Geometry, double) @see #normalize() @see #norm()

Implementation

bool equalsExactGeom(Geometry other) {
  return this == other || equalsExactWithTol(other, 0);
}