Skip to main content

equalsExact

Returns true if geometries a and b are of the same type and have the same vertices in the same order on the XY plane.

Vertices are checked by index so any additional midpoint or reversed order results in the geometries not being considered equal.

Vertices are compared only by their X and Y values, Z and M values are ignored.

Parameters

NameTypeDescription
aGeometryFirst geometry
bGeometrySecond geometry
tolerancenumberTolerance to determine vertex equality

Returns

boolean

true if geometries a and b are of the same type and have matching vertices

See also

  • equals checks if two geometries are topologically equal
  • equalsIdentical checks whether two geometries are of the same type and have exactly the same vertices in the same order on the XYZM plane
  • GeometryRef#normalize normalized geometries are easier to compare

Examples