public class CoordinateWithinTolerancePointEquality extends Object
PointEquality
that considers Point
s to be equal when their coordinates
are within a specified tolerance of each other.Constructor and Description |
---|
CoordinateWithinTolerancePointEquality(DimensionalFlag dimensionalFlag,
double tolerance)
Constructs an instance
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(double[] first,
DimensionalFlag df1,
double[] second,
DimensionalFlag df2)
Tests whether the specified coordinates represent the same point.
|
protected boolean |
equals(double co1,
double co2) |
boolean |
equals(Point first,
Point second)
Tests whether the specified
Point s are equal. |
protected double |
get(double[] coordinates,
int index) |
protected DimensionalFlag |
getDimensionalFlag() |
public CoordinateWithinTolerancePointEquality(DimensionalFlag dimensionalFlag, double tolerance)
dimensionalFlag
- specifies the dimensions that will be considered in the equality checktolerance
- the tolerance within which coordinates are considered equalprotected boolean equals(double co1, double co2)
public boolean equals(Point first, Point second)
Point
s are equal.equals
in interface PointEquality
first
- first Point
second
- second Point
Point
.public boolean equals(double[] first, DimensionalFlag df1, double[] second, DimensionalFlag df2)
The coordinates are assumed to be in the same Coordinate Reference System.
equals
in interface PointEquality
first
- the coordinates of the first Point
df1
- the DimensionalFlag
for the first coordinate arraysecond
- the coordinates second Point
to testdf2
- the DimensionalFlag
for the second coordinate arrayPoint
s represented by the coordinates are equalprotected double get(double[] coordinates, int index)
protected DimensionalFlag getDimensionalFlag()
Copyright © 2015 geolatte.org. All rights reserved.