public MatchedWaypoint getMatchedWaypoint(int idx) {
        if (matchedWaypoints == null) {
            return null;
        }
        for (MatchedWaypoint wp : matchedWaypoints) {
            if (idx == wp.indexInTrack) {
                return wp;
            }
        }
        return null;
    }
writes the track in binary-format to a file

@param filename the filename to write to
main/src/main/java/cgeo/geocaching/brouter/core/OsmTrack.java