Changeset 34081 in osm for applications
- Timestamp:
- 2018-02-27T20:20:24+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/download_along/src/org/openstreetmap/josm/plugin/download_along/DownloadAlongWayAction.java
r33710 r34081 26 26 import org.openstreetmap.josm.tools.Logging; 27 27 import org.openstreetmap.josm.tools.Shortcut; 28 import org.openstreetmap.josm.tools.Utils; 28 29 29 30 class DownloadAlongWayAction extends DownloadAlongAction { … … 57 58 return; 58 59 } 60 61 Logging.info("Starting area computation"); 62 long start = System.currentTimeMillis(); 59 63 60 64 /* … … 103 107 Double d = c.greatCircleDistance(previous) / buffer_dist; 104 108 int nbNodes = d.intValue(); 105 Logging.info(tr("{0} intermediate nodes to download.", nbNodes)); 106 Logging.info(tr("between {0} {1} and {2} {3}", c.lat(), c.lon(), previous.lat(), 107 previous.lon())); 109 if (Logging.isDebugEnabled()) { 110 Logging.debug(tr("{0} intermediate nodes to download.", nbNodes)); 111 Logging.debug(tr("between {0} {1} and {2} {3}", c.lat(), c.lon(), previous.lat(), previous.lon())); 112 } 108 113 for (int i = 1; i < nbNodes; i++) { 109 114 intermediateNodes.add(new LatLon(previous.lat() 110 115 + (i * (c.lat() - previous.lat()) / (nbNodes + 1)), previous.lon() 111 116 + (i * (c.lon() - previous.lon()) / (nbNodes + 1)))); 112 Logging.info(tr(" adding {0} {1}", previous.lat() 113 + (i * (c.lat() - previous.lat()) / (nbNodes + 1)), previous.lon() 114 + (i * (c.lon() - previous.lon()) / (nbNodes + 1)))); 117 if (Logging.isTraceEnabled()) { 118 Logging.trace(tr(" adding {0} {1}", previous.lat() 119 + (i * (c.lat() - previous.lat()) / (nbNodes + 1)), previous.lon() 120 + (i * (c.lon() - previous.lon()) / (nbNodes + 1)))); 121 } 115 122 } 116 123 } … … 128 135 } 129 136 Area a = new Area(path); 137 Logging.info("Area computed in " + Utils.getDurationString(System.currentTimeMillis() - start)); 130 138 confirmAndDownloadAreas(a, max_area, panel.isDownloadOsmData(), panel.isDownloadGpxData(), 131 139 tr("Download from OSM along selected ways"), NullProgressMonitor.INSTANCE);
Note:
See TracChangeset
for help on using the changeset viewer.