src/main/java/de/blau/android/osm/StorageDelegator.java
/**
     * Move a list of nodes, apply translation only once
     * 
     * @param allNodes the list of nodes
     * @param deltaLatE7 the delta to move the latitude (WGS84*1E7)
     * @param deltaLonE7 the delta to move the longitude (WGS84*1E7)
     */
Move a list of nodes, apply translation only once

@param allNodes the list of nodes
@param deltaLatE7 the delta to move the latitude (WGS84*1E7)
@param deltaLonE7 the delta to move the longitude (WGS84*1E7)
Move a list of nodes apply translation only once @param allNodes the list of nodes @param deltaLatE7 the delta to move the latitude ( WGS84 * 1E7 ) @param deltaLonE7 the delta to move the longitude ( WGS84 * 1E7 )
public void moveNodes(@Nullable final List<Node> allNodes, final int deltaLatE7, final int deltaLonE7) {
        if (allNodes == null) {
            Log.e(DEBUG_TAG, "moveNodes  no nodes!");
            return;
        }
        dirty = true;
        try {
            Set<Node> nodes = new HashSet<>(allNodes); 
            for (Node nd : nodes) {
                validateCoordinates(nd.getLat() + deltaLatE7, nd.getLon() + deltaLonE7);
            }
            invalidateWayBoundingBox(nodes);
            for (Node nd : nodes) {
                undo.save(nd);
                updateLatLon(nd, nd.getLat() + deltaLatE7, nd.getLon() + deltaLonE7);
            }
        } catch (StorageException e) {
            Log.e(DEBUG_TAG, "moveNodes got " + e.getMessage());
        }
    }
public void moveNodes ( @ Nullable final List < Node > allNodes , final int deltaLatE7 , final int deltaLonE7 ) { if ( allNodes == null ) { Log . e ( DEBUG_TAG , "moveNodes  no nodes!" ) ; return ; } dirty = true ; try { Set < Node > nodes = new HashSet < > ( allNodes ) ; for ( Node nd : nodes ) { validateCoordinates ( nd . getLat ( ) + deltaLatE7 , nd . getLon ( ) + deltaLonE7 ) ; } invalidateWayBoundingBox ( nodes ) ; for ( Node nd : nodes ) { undo . save ( nd ) ; updateLatLon ( nd , nd . getLat ( ) + deltaLatE7 , nd . getLon ( ) + deltaLonE7 ) ; } } catch ( StorageException e ) { Log . e ( DEBUG_TAG , "moveNodes got " + e . getMessage ( ) ) ; } }
Move a list of nodes, apply translation only once
Move a list of nodes apply translation only once
// Guarantee uniqueness // check that all coordinates are valid before moving // Don't call onElementChanged // TODO handle OOM