openstreetmap / iD

🆔 The easy-to-use OpenStreetMap editor in JavaScript.
https://www.openstreetmap.org/edit?editor=id
ISC License
3.36k stars 1.21k forks source link

Bus stop and platform added to end of bus route relation #4978

Open lakedistrictOSM opened 6 years ago

lakedistrictOSM commented 6 years ago

Not sure if this is a duplicate of another issue - I created a bus route relation in iD (https://www.openstreetmap.org/relation/8191135/history v1) and all stops, platforms and roads were in the correct order apart from the last bus stop and platform which was added to the relation after the road ways.

The expected behaviour is the order of members as they are in v3. The actual behaviour was the order of members as they were in v1.

Note that this bus stop (Windermere Railway Station (2)) is visited twice on this circular route.

bhousel commented 6 years ago

Is the issue that iD reordered the stops and platforms? It is supposed to leave their order alone, but put them first in the member list. (related #4946 which is fixed but not deployed yet)

Or that iD misordered the highway ways? It is supposed to put them into the order that the bus travels over them, but iD struggles when there are loops. (related #4876 which is not fixed yet)

lakedistrictOSM commented 6 years ago

Because it was a new relation iD didn't reorder the stops and platforms but just ordered them wrong.

All the stops and platforms should be ordered first, then the highway ways. But you can see that in v1 whilst most of the bus stops were listed before the highways, one bus stop and platform was listed after the highway ways. This was flagged as invalid in OSMI PTv2 route inspector.

v3 shows how the order of members in the reaction should have been.

Maybe it's because this bus stop is visited twice on the route? (the route starts and ends there)

I'll have a go at another circular bus route later to see if the issue is reproducible.

bhousel commented 6 years ago

Oh yeah we can't get the stop/platform order correct the first time. I'm not even sure it's possible.

I even added a comment about this in the code 😬 https://github.com/openstreetmap/iD/blob/1866e40c82d43093eba9bb5f23850fbd1907c4cf/modules/actions/add_member.js#L20-L25

Probably the only solution is to give users the ability to reorder the relations manually, like by dragging them up and down in the list, or move up/down buttons. That would be #2283

lakedistrictOSM commented 6 years ago

I've just created a new relation - this one's much shorter: https://www.openstreetmap.org/relation/8197678/history v1

Again, iD has put the final stop and platform after the highway ways.

(Also again this was a circular route where the route starts and ends at the same bus stop)

bhousel commented 6 years ago

@lakedistrictOSM can you share the exact steps how you created the most recent one? I am guessing that you did:

  1. Create platforms and stop as features (points or lines)
  2. Click the '+' under parent relations to add to a new relation
  3. Tag this relation as a bus route
  4. Click '+' to add members to the relation (they will get put at the end by default)
  5. Assign roles (this step will not reorder the stops or platforms)

Sound right? I am kind of leaning towards "this behavior is expected and we can't do anything about it but #2283 is the eventual solution that will let you reorder them yourself".

lakedistrictOSM commented 6 years ago
  1. Split highway ways where necessary and create stops
  2. Select first highway section, All Relations > + > New relation...
  3. Search bus route and add details
  4. Add highway ways, bus stops and stopping locations as I got to them (assigning platform/stop roles where needed) in the order the bus would get to them

Note that one stop was added to the relation twice since the route both starts and ends there.

iD needs to:

  1. add nodes to relation in the order the user added them
  2. then add highway ways to the relation in the order the user added them

iD mostly manages this, but the problem is that, for these examples, iD put the bus stop and platform that's visited twice after the highway ways.

Woazboat commented 3 years ago

I've had to fix dozens of PTv2 bus route relations recently because another mapper tried to edit them with iD, which resulted in exactly this bug (bus stops/platforms added to the end of the relation member list instead of in the proper order). Note that these were preexisting routes and not newly created ones. It would be nice to get this fixed.