@Override
    public boolean equals(Object obj) {
        if (obj == null)
            return false;

        @SuppressWarnings("unchecked")
        final GHPoint3D other = (GHPoint3D) obj;
        if (Double.isNaN(ele))
            // very special case necessary in QueryGraph, asserted via test
            return NumHelper.equalsEps(lat, other.lat) && NumHelper.equalsEps(lon, other.lon);
        else
            return NumHelper.equalsEps(lat, other.lat) && NumHelper.equalsEps(lon, other.lon)
                    && NumHelper.equalsEps(ele, other.ele, 0.01);
    }
@Test
    public void testEquals() {
        GHPoint3D point1 = new GHPoint3D(1, 2, Double.NaN);
        GHPoint3D point2 = new GHPoint3D(1, 2, Double.NaN);
        assertEquals(point1, point2);

        point1 = new GHPoint3D(1, 2, 0);
        point2 = new GHPoint3D(1, 2, 1);
        assertNotEquals(point1, point2);

        point1 = new GHPoint3D(1, 2, 0);
        point2 = new GHPoint3D(1, 2.1, 0);
        assertNotEquals(point1, point2);

        point1 = new GHPoint3D(1, 2.1, 0);
        point2 = new GHPoint3D(1, 2.1, 0);
        assertEquals(point1, point2);
    }