equals2D method

  1. @override
bool equals2D(
  1. covariant Geometry other, {
  2. double toleranceHoriz = defaultEpsilon,
})
override

True if this and other equals by testing 2D coordinate values of all position data (that must be in same order in both objects) contained directly or by child objects.

Returns false if this and other are not of the same subtype.

Returns false if this or other contain "empty geometry".

Differences on 2D coordinate values (ie. x and y, or lon and lat) between this and other must be within toleranceHoriz.

Tolerance values must be positive (>= 0.0).

Implementation

@override
bool equals2D(
  Geometry other, {
  double toleranceHoriz = defaultEpsilon,
}) =>
    testEquals2D<LineString>(
      this,
      other,
      (lineString1, lineString2) => lineString1.chain.equals2D(
        lineString2.chain,
        toleranceHoriz: toleranceHoriz,
      ),
      toleranceHoriz: toleranceHoriz,
    );