Changeset 5084 in osm for applications/editors/josm/plugins/utilsplugin/src
- Timestamp:
- 2007-10-19T14:40:17+02:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/SimplifyWayAction.java
r5076 r5084 60 60 61 61 if (used) { 62 if (toI - i >= 2) { 63 ArrayList<Node> ns = new ArrayList<Node>(); 64 simplifyWayRange(wnew, i, toI, ns, threshold); 65 for (int j = toI-1; j > i; j--) wnew.nodes.remove(j); 66 wnew.nodes.addAll(i+1, ns); 67 } 62 simplifyWayRange(wnew, i, toI, threshold); 68 63 toI = i; 69 64 } 70 65 } 66 simplifyWayRange(wnew, 0, toI, threshold); 71 67 72 68 HashSet<Node> delNodes = new HashSet<Node>(); … … 83 79 cmds)); 84 80 Main.map.repaint(); 81 } 82 } 83 84 public void simplifyWayRange(Way wnew, int from, int to, double thr) { 85 if (to - from >= 2) { 86 ArrayList<Node> ns = new ArrayList<Node>(); 87 simplifyWayRange(wnew, from, to, ns, thr); 88 for (int j = to-1; j > from; j--) wnew.nodes.remove(j); 89 wnew.nodes.addAll(from+1, ns); 85 90 } 86 91 }
Note:
See TracChangeset
for help on using the changeset viewer.