private OsmPath getStartPath(final OsmNode n1, final OsmNode n2, final MatchedWaypoint mwp, final OsmNodeNamed endPos, final boolean sameSegmentSearch) {
        if (endPos != null) {
            endPos.radius = 1.5;
        }
        final OsmPath p = getStartPath(n1, n2, new OsmNodeNamed(mwp.crosspoint), endPos, sameSegmentSearch);

        // special case: start+end on same segment
        if (p.cost >= 0 && sameSegmentSearch && endPos != null && endPos.radius < 1.5) {
            p.treedepth = 0; // hack: mark for the final-check
        }
        return p;
    }
find the elevation type for position
to determine the filter value

@param n  the point
@return  the filter value for 1sec / 3sec elevation source
main/src/main/java/cgeo/geocaching/brouter/core/RoutingEngine.java