equalsTopo method
Tests whether this geometry is topologically equal to the argument geometry
as defined by the SFS equals
predicate.
The SFS equals
predicate has the following equivalent definitions:
- The two geometries have at least one point in common, and no point of either geometry lies in the exterior of the other geometry.
- The DE-9IM Intersection Matrix for the two geometries matches
the pattern
T*F**FFF*
T*F **F FF*
@param g the Geometry
with which to compare this Geometry
@return true
if the two Geometry
s are topologically equal
@see #equalsExact(Geometry)
Implementation
bool equalsTopo(Geometry g) {
// short-circuit test
if (getEnvelopeInternal() != g.getEnvelopeInternal()) return false;
return relate(g).isEquals(getDimension(), g.getDimension());
}