Two geometries are equal if they occupy the same space.

Note that the two geometries shown below have a different number of vertices, but they are still equal.

Example 1: Is Geometry A equal to Geometry B?

static boolean geometryEquals(Geometry geometryA, Geometry geometryB, SpatialReference sr)
{
  boolean equals = OperatorEquals.local().execute(geometryA, geometryB, sr, null);
  return equals;
}