osrm-backend
                                
                                
                                
                                    osrm-backend copied to clipboard
                            
                            
                            
                        Broken round-about numbering for roundabouts with service roads
Breaking this out from https://github.com/Project-OSRM/osrm-backend/issues/2113
Both exits here are called the first exit.

This issue has been encountered again in https://community.openstreetmap.org/t/directions-say-2nd-exit-reality-is-3rd-exit/103341. It should not be too hard to fix, right?
The fix does seem simple, but the behaviour is explicitly defined in the code.
https://github.com/Project-OSRM/osrm-backend/blob/14dcf918121fa7a12addda60395cc5c3dee6ad33/src/guidance/roundabout_handler.cpp#L420-L431
The original PR implementation in #4075, seems to think this is the correct behaviour: https://github.com/Project-OSRM/osrm-backend/issues/4075#issuecomment-303412765
Is this expectation still correct? The other routers seem to think not.
I can see there is an obvious problem when you do actually take a service-road exit, such as when your journey ends on the service road.
Fron the example I linked, the exits were of equal size (based on actually driving there). So the type of road the exit leads to may not influence the size of the roundabout flare, and thereby not influence how a driver would see and count the exits from inside the roundabout.
Furthermore, the exit roads could have imperfect classifications. So I would vote heavily to count the exits as long as a car can drive on them, irrespective of classification.
Here is the actual roundabout object for investigations: https://www.openstreetmap.org/way/40837718