Open twprzybysz opened 4 years ago
I assume that some interpolation is done here
As long as options.routeShapeResolution
is full
(which is the default), route.coordinates
should contain many more coordinates than the coordinates
that you converted into waypoints. Waypoints are the locations you know in advance that you want the user to visit, whereas route.coordinates
contains enough coordinates for you to know how the user will need to travel to get from one waypoint to the next.
In general, the additional coordinates aren’t due to interpolation; rather, each coordinate is supposed to correspond to a node along a way in OpenStreetMap. OSM may insert a node for many reasons, not necessarily due to the road’s geometry.
However, the Directions API doesn’t appear to be returning the expected results in this area. The first two waypoints are very close to each other and should get snapped to different points along Via Cosenza. Here’s how the OSRM-powered FOSSGIS Routing Service routes between the first two waypoints:
By contrast, this request returns an unexpected geometry that starts with a spurious coordinate corresponding to the end of Via Cosenza:
The mapbox/driving profile returns the same result as OSRM, but the mapbox/cycling profile returns a zero-length geometry at the destination waypoint.
/cc @mapbox/directions-traffic-and-data
@1ec5 any update on this?
I’ve reported the issue to the backend routing team to investigate the issue. Unfortunately, there’s nothing we can do on the client side to work around the issue.
Do you see a similar issue with other roads in Tripoli, or just this particular road?
@1ec5 so far only this one.
Steps to reproduce:
Expected behavior First point from returned route is first coordinate.
Actual behavior First point from returned route is second coordinate.
Configuration Mapbox-iOS-SDK: 5.4.0 Mapbox Navigation 0.38.1 iOS versions: 13.3 Device/simulator models: all Xcode version: 11.3