Package org.geolatte.geom
Class WithinTolerancePositionEquality
- java.lang.Object
-
- org.geolatte.geom.WithinTolerancePositionEquality
-
- All Implemented Interfaces:
PositionEquality
public class WithinTolerancePositionEquality extends Object
APositionEqualitythat considersPoints to be equal when their coordinates are within a specified tolerance of each other.- Author:
- Karel Maesen, Geovise BVBA creation-date: 4/25/12
-
-
Constructor Summary
Constructors Constructor Description WithinTolerancePositionEquality(double tolerance)Constructs an instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <P extends Position>
booleanequals(double[] first, double[] second)Tests whether the specified coordinates represent the same point.protected booleanequals(double co1, double co2)<P extends Position>
booleanequals(P first, P second)Tests whether the specifiedCoordinatess are equal.<P extends Position>
booleanequals2D(P first, P second)Tests whether the specifiedCoordinatess are equal in the base 2D-CoordinateReferenceSystem.
-
-
-
Method Detail
-
equals
protected boolean equals(double co1, double co2)
-
equals
public <P extends Position> boolean equals(P first, P second)
Tests whether the specifiedCoordinatess are equal.- Specified by:
equalsin interfacePositionEquality- Parameters:
first- firstPointsecond- secondPoint- Returns:
- true iff the first is equal to the second
Positoin.
-
equals2D
public <P extends Position> boolean equals2D(P first, P second)
Description copied from interface:PositionEqualityTests whether the specifiedCoordinatess are equal in the base 2D-CoordinateReferenceSystem.- Specified by:
equals2Din interfacePositionEquality- Parameters:
first- firstPointsecond- secondPoint- Returns:
- true iff the first is equal to the second
Position.
-
equals
public <P extends Position> boolean equals(double[] first, double[] second)
Tests whether the specified coordinates represent the same point.- Specified by:
equalsin interfacePositionEquality- Parameters:
first- the first coordinate arraysecond- the second coordinate array- Returns:
- true iff the
coordinatess are equal
-
-