/** Filter duplicate points. * @param pathPoints with the arras of points. * @return the filtered array. */ private static GeoPoint[] filterPoints(final GeoPoint[] pathPoints) { final List<GeoPoint> noIdenticalPoints = new ArrayList<>(pathPoints.length); for (int i = 0; i < pathPoints.length - 1; i++) { if (!pathPoints[i].isNumericallyIdentical(pathPoints[i + 1])) { noIdenticalPoints.add(pathPoints[i]); } } noIdenticalPoints.add(pathPoints[pathPoints.length - 1]); return noIdenticalPoints.toArray(new GeoPoint[noIdenticalPoints.size()]); }
for (int i = 0; i < input.size()-1; i++) { final GeoPoint thePoint = input.get(getLegalIndex(- i - 1, input.size())); if (!thePoint.isNumericallyIdentical(comparePoint)) { startIndex = getLegalIndex(-i, input.size()); break; if (!nextNonIdenticalPoint.isNumericallyIdentical(currentPoint)) { break;
GeoPoint endPoint = points.get(endPointIndex); if (startPoint.isNumericallyIdentical(endPoint)) { int nextPointIndex = getLegalIndex(endPointIndex + 1, points.size()); final GeoPoint nextPoint = points.get(nextPointIndex); if (startPoint.isNumericallyIdentical(nextPoint)) {
assert !testPoint.isNumericallyIdentical(intersectionPoint) : "test point is the same as intersection point"; assert !intersectionPoint.isNumericallyIdentical(thePointX, thePointY, thePointZ) : "check point is same as intersection point";
if (testPointIntersections != null) { for (final GeoPoint otherIntersection : testPointIntersections) { if (edge.startPlane.strictlyWithin(otherIntersection) && edge.endPlane.strictlyWithin(otherIntersection) && intersection.isNumericallyIdentical(otherIntersection)) {
if (testPoint.isNumericallyIdentical(x, y, z)) { return testPointInSet;