Changeset 33704 in osm for applications/editors/josm
- Timestamp:
- 2017-10-05T11:21:31+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryUtils.java
r33676 r33704 273 273 } 274 274 275 boolean useRobust = Main.pref.getBoolean("utilsplugin2.replace-geometry.robustAssignment", true); 275 int gLen = geometryPool.size(); 276 int nLen = nodePool.size(); 277 int N = Math.max(gLen, nLen); 278 boolean useRobust = Main.pref.getBoolean("utilsplugin2.replace-geometry.robustAssignment", true) 279 && N <= Main.pref.getInt("utilsplugin2.replace-geometry.robustAssignment.max-size", 300); 276 280 277 281 // Find new nodes that are closest to the old ones, remove matching old ones from the pool 278 282 // Assign node moves with least overall distance moved 279 283 Map<Node, Node> nodeAssoc = new HashMap<>(); 280 if (g eometryPool.size() > 0 && nodePool.size()> 0) {284 if (gLen > 0 && nLen > 0) { 281 285 if (useRobust) { // use robust, but slower assignment 282 int gLen = geometryPool.size();283 int nLen = nodePool.size();284 int N = Math.max(gLen, nLen);285 286 double[][] cost = new double[N][N]; 286 287 for (int i = 0; i < N; i++) {
Note:
See TracChangeset
for help on using the changeset viewer.