Changeset 10001 in josm for trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongTrackAction.java
- Timestamp:
- 2016-03-17T01:50:12+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongTrackAction.java
r9817 r10001 93 93 * and then stop because it has more than 50k nodes. 94 94 */ 95 final double buffer _dist = panel.getDistance();96 final double max _area = panel.getArea() / 10000.0 / scale;97 final double buffer _y = buffer_dist / 100000.0;98 final double buffer _x = buffer_y/ scale;95 final double bufferDist = panel.getDistance(); 96 final double maxArea = panel.getArea() / 10000.0 / scale; 97 final double bufferY = bufferDist / 100000.0; 98 final double bufferX = bufferY / scale; 99 99 final int totalTicks = latcnt; 100 100 // guess if a progress bar might be useful. 101 final boolean displayProgress = totalTicks > 2000 && buffer _y< 0.01;101 final boolean displayProgress = totalTicks > 2000 && bufferY < 0.01; 102 102 103 103 class CalculateDownloadArea extends PleaseWaitRunnable { … … 126 126 return; 127 127 } 128 confirmAndDownloadAreas(a, max _area, panel.isDownloadOsmData(), panel.isDownloadGpxData(),128 confirmAndDownloadAreas(a, maxArea, panel.isDownloadOsmData(), panel.isDownloadGpxData(), 129 129 tr("Download from OSM along this track"), progressMonitor); 130 130 } … … 147 147 tick(); 148 148 LatLon c = p.getCoor(); 149 if (previous == null || c.greatCircleDistance(previous) > buffer _dist) {149 if (previous == null || c.greatCircleDistance(previous) > bufferDist) { 150 150 // we add a buffer around the point. 151 r.setRect(c.lon() - buffer _x, c.lat() - buffer_y, 2 * buffer_x, 2 * buffer_y);151 r.setRect(c.lon() - bufferX, c.lat() - bufferY, 2 * bufferX, 2 * bufferY); 152 152 a.add(new Area(r)); 153 153 return c;
Note:
See TracChangeset
for help on using the changeset viewer.