osrm-backend icon indicating copy to clipboard operation
osrm-backend copied to clipboard

Destination to last point

Open kalthwaini opened this issue 2 years ago • 1 comments

I have noticed an incorrect OSRM api trip outputs with the parameters source and destinations. I find the output reasonable when i set:

The source to first and the destination to any, where it always places the first point on the request as first on the output. When setting the both source and destination, it returns the first point on the request first and the last point on the request last. Yet, when I make the source "any" and the destination to "last" it makes the last point on the request as the first on the output! Below some examples:

http://router.project-osrm.org/trip/v1/driving/46.6359664268742,25.147417042017455;46.55202006780303,24.276429438032416;46.83690333019565,25.197854757462096;46.390672297621165,24.57275567067818;47.05883858688196,24.78384340079704;47.187203747390804,24.66488235961968;46.36822542551795,24.50195909455135;47.071489724194414,24.566599934277598;46.26489930321652,24.777441092961066;46.35333262071744,24.287505471083612?roundtrip=true&source=any&destination=last

http://router.project-osrm.org/trip/v1/driving/46.6359664268742,25.147417042017455;46.55202006780303,24.276429438032416;46.83690333019565,25.197854757462096;46.390672297621165,24.57275567067818;47.05883858688196,24.78384340079704;47.187203747390804,24.66488235961968;46.36822542551795,24.50195909455135;47.071489724194414,24.566599934277598;46.26489930321652,24.777441092961066;46.35333262071744,24.287505471083612?roundtrip=true&source=first&destination=any

http://router.project-osrm.org/trip/v1/driving/46.6359664268742,25.147417042017455;46.55202006780303,24.276429438032416;46.83690333019565,25.197854757462096;46.390672297621165,24.57275567067818;47.05883858688196,24.78384340079704;47.187203747390804,24.66488235961968;46.36822542551795,24.50195909455135;47.071489724194414,24.566599934277598;46.26489930321652,24.777441092961066;46.35333262071744,24.287505471083612?roundtrip=true&source=first&destination=last

kalthwaini avatar Dec 03 '22 15:12 kalthwaini

With v5.27.1 this still happens. Although it does occur with roundtrip enabled, only and for a roundtrip, the result is kind of correct this way (if you know how to interpret it).

RhinoDevel avatar May 14 '24 11:05 RhinoDevel