Changeset 33427 in osm for applications/editors/josm
- Timestamp:
- 2017-07-06T13:01:55+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/actions/SplitRoundaboutAction.java
r33418 r33427 123 123 List<Relation> parents = getPTRouteParents(roundabout); 124 124 parents.removeIf(r -> !r.hasIncompleteMembers()); 125 if(parents.isEmpty()) 125 if(parents.isEmpty()) { 126 126 continueAfterDownload(roundabout); 127 return; 128 } 127 129 128 130 Future <?>future = Main.worker.submit(new DownloadRelationMemberTask( … … 247 249 parents.remove(roundabout); 248 250 for(Way parent: parents) { 249 if(!get PTRouteParents(parent).isEmpty()) {251 if(!getRouteParents(parent).isEmpty()) { 250 252 return false; 251 253 } … … 292 294 roundabout.getReferrers(), Relation.class); 293 295 referrers.removeIf(r -> !RouteUtils.isPTRoute(r)); 296 return referrers; 297 } 298 299 private List<Relation> getRouteParents(Way roundabout) { 300 List <Relation> referrers = OsmPrimitive.getFilteredList( 301 roundabout.getReferrers(), Relation.class); 302 referrers.removeIf(r -> !RouteUtils.isRoute(r)); 294 303 return referrers; 295 304 } -
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/utils/RouteUtils.java
r33418 r33427 72 72 } 73 73 74 public static boolean isRoute(Relation r) { 75 return r.get("route") != null; 76 } 77 74 78 /** 75 79 * Checks if the relation member refers to a stop in a public transport
Note:
See TracChangeset
for help on using the changeset viewer.