Changeset 33726 in osm for applications/editors/josm/plugins/pt_assistant
- Timestamp:
- 2017-10-22T16:03:32+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/actions/SplitRoundaboutAction.java
r33619 r33726 49 49 * point to the exit point of the roundabout. 50 50 * 51 * @author giacomo 51 * @author giacomo, polyglot 52 52 */ 53 53 public class SplitRoundaboutAction extends JosmAction { … … 108 108 MainApplication.undoRedo.add(getRemoveRoundaboutFromRelationsCommand(roundabout)); 109 109 110 //split the roundabout on the design ed nodes110 //split the roundabout on the designated nodes 111 111 List<Node> splitNodes = getSplitNodes(roundabout); 112 112 SplitWayCommand result = SplitWayCommand.split( … … 254 254 private Pair<Way, Way> getEntryExitWays(Relation r, Integer position) { 255 255 256 //the ways returned are the one exactly before and after the roundabout256 //the ways returned are the ones exactly before and after the roundabout 257 257 Pair<Way, Way> ret = new Pair<>(null, null); 258 258 … … 268 268 } 269 269 270 //split on ly on the nodes which might be the271 //entry or exit point for some public transport route270 //split on all nodes which are the 271 //entry or exit point for route relations 272 272 public List<Node> getSplitNodes(Way roundabout) { 273 273 Set<Node> noDuplicateSplitNodes = new HashSet<>(roundabout.getNodes()); … … 277 277 List<Way> parents = n.getParentWays(); 278 278 if (parents.size() == 1) 279 return true; 279 return true; // return value for removeIf, not of the method 280 280 parents.remove(roundabout); 281 281 for (Way parent: parents) { 282 282 if (!getRouteParents(parent).isEmpty()) { 283 return false; 283 return false; // return value for removeIf 284 284 } 285 285 } 286 287 return true; 288 }); 286 return true; // return value for removeIf 287 }); 289 288 return splitNodes; 290 289 }
Note:
See TracChangeset
for help on using the changeset viewer.