Changeset 8510 in josm for trunk/src/org/openstreetmap/josm/tools/GeoPropertyIndex.java
- Timestamp:
- 2015-06-20T23:42:21+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/GeoPropertyIndex.java
r8470 r8510 73 73 public static int index(LatLon ll, int level) { 74 74 long noParts = 1 << level; 75 long x = ((long) ((ll.lon() + 180.0) * noParts / 360.0)) & 1;76 long y = ((long) ((ll.lat() + 90.0) * noParts / 180.0)) & 1;75 long x = ((long) ((ll.lon() + 180.0) * noParts / 360.0)) & 1; 76 long y = ((long) ((ll.lat() + 90.0) * noParts / 180.0)) & 1; 77 77 return (int) (2 * x + y); 78 78 } … … 149 149 if (DEBUG) System.err.println(" - new with idx "+idx); 150 150 LatLon center = bbox.getCenter(); 151 BBox b = new BBox(lon1, lat1, center.lon(), center.lat());151 BBox b = new BBox(lon1, lat1, center.lon(), center.lat()); 152 152 children[idx] = new GPLevel<>(level + 1, b, this, owner); 153 153 }
Note:
See TracChangeset
for help on using the changeset viewer.