Ignore:
Timestamp:
05.02.2010 20:52:53 (2 years ago)
Author:
mjulius
Message:

fixes #4441 - error downloading/sync
when updating data round bounding boxes to LatLon.MAX_SERVER_PRECISION and really eliminate empty download areas before downloading

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/Bounds.java

    r2941 r2942  
    241241    } 
    242242 
     243    /** 
     244     * Returns a clone of this Bounds, rounded to OSM precisions, i.e. to 
     245     * LatLon.MAX_SERVER_PRECISION 
     246     * 
     247     * @return a clone of this Bounds 
     248     */ 
     249    public Bounds getRoundedToOsmPrecision() { 
     250        return new Bounds( 
     251                Math.round(minLat / LatLon.MAX_SERVER_PRECISION) * LatLon.MAX_SERVER_PRECISION, 
     252                Math.round(minLon / LatLon.MAX_SERVER_PRECISION) * LatLon.MAX_SERVER_PRECISION, 
     253                Math.round(maxLat / LatLon.MAX_SERVER_PRECISION) * LatLon.MAX_SERVER_PRECISION, 
     254                Math.round(maxLon / LatLon.MAX_SERVER_PRECISION) * LatLon.MAX_SERVER_PRECISION 
     255        ); 
     256    } 
    243257} 
Note: See TracChangeset for help on using the changeset viewer.