public static boolean saveWaypoint(final int id, final String geocode, final Waypoint waypoint) {
        // parent could be lazy loaded, so not inside access lock
        final Geocache cache = waypoint.getParentGeocache();
        return withAccessLock(() -> {

            if (cache != null) {
                saveFinalDefinedStatusWithoutTransaction(cache);
            }
            if (saveWaypointInternal(id, geocode, waypoint)) {
                removeCache(geocode, EnumSet.of(RemoveFlag.CACHE));
                return true;
            }
            return false;
        });
    }
Loads all Waypoints in the coordinate rectangle.
main/src/main/java/cgeo/geocaching/storage/DataStore.java