Changeset 33726 in osm


Ignore:
Timestamp:
2017-10-22T16:03:32+02:00 (7 years ago)
Author:
polyglot
Message:

Prepare for adding treatment of bicycle, foot and routes that are not PT v2

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  
    4949 * point to the exit point of the roundabout.
    5050 *
    51  * @author giacomo
     51 * @author giacomo, polyglot
    5252 */
    5353public class SplitRoundaboutAction extends JosmAction {
     
    108108        MainApplication.undoRedo.add(getRemoveRoundaboutFromRelationsCommand(roundabout));
    109109
    110         //split the roundabout on the designed nodes
     110        //split the roundabout on the designated nodes
    111111        List<Node> splitNodes = getSplitNodes(roundabout);
    112112        SplitWayCommand result = SplitWayCommand.split(
     
    254254    private Pair<Way, Way> getEntryExitWays(Relation r, Integer position) {
    255255
    256         //the ways returned are the one exactly before and after the roundabout
     256        //the ways returned are the ones exactly before and after the roundabout
    257257        Pair<Way, Way> ret = new Pair<>(null, null);
    258258
     
    268268    }
    269269
    270     //split only on the nodes which might be the
    271     //entry or exit point for some public transport route
     270    //split on all nodes which are the
     271    //entry or exit point for route relations
    272272    public List<Node> getSplitNodes(Way roundabout) {
    273273        Set<Node> noDuplicateSplitNodes = new HashSet<>(roundabout.getNodes());
     
    277277            List<Way> parents = n.getParentWays();
    278278            if (parents.size() == 1)
    279                 return true;
     279                return true; // return value for removeIf, not of the method
    280280            parents.remove(roundabout);
    281281            for (Way parent: parents) {
    282282                if (!getRouteParents(parent).isEmpty()) {
    283                         return false;
     283                        return false; // return value for removeIf
    284284                }
    285285            }
    286 
    287             return true;
    288         });
     286            return true; // return value for removeIf
     287            });
    289288        return splitNodes;
    290289    }
Note: See TracChangeset for help on using the changeset viewer.