Out of bounds error

Hi. I am getting API Error 500 when I use location coordinates
coords = ((1.404052, 103.9053),
(1.404584, 103.9052),
(1.404375, 103.9048),
(1.405832, 103.9068),
(1.406081, 103.9064),
(1.408701, 103.9013))
client = openrouteservice.Client(key=’’) # Specify your personal API key
routes = client.directions(coords, profile=‘cycling-regular’,optimize_waypoints=True)

print(routes)

The error is as follows:
ApiError: 500 ({‘code’: 3, ‘error’: ‘ORS matrix:Source point(s) [0, 1, 2, 3, 4, 5] out of bounds: 103.9053,1.404052; 103.9013,1.408701; 103.9052,1.404584; 103.9048,1.404375; 103.9068,1.405832; 103.9064,1.406081. Destination point(s) [0, 1, 2, 3, 4, 5] out of bounds: 103.9053,1.404052; 103.9013,1.408701; 103.9052,1.404584; 103.9048,1.404375; 103.9068,1.405832; 103.9064,1.406081’})

How can I fix this?

Hi @Shashi_Kant,

Please use the correct coordinates order, which is longitude,latitude.

Best regards

i have the same problem only im using vroom-express

{"vehicles":[{"id":1,"profile":"driving-car","start":[54.709692, 25.272143], "end":[54.709692, 25.272143]}],"jobs":[{"id": 179,"location":[54.693050, 25.269890]},{"id": 178,"location":[54.683740, 25.289531]},{"id": 182,"location":[54.685166, 25.293319]},{"id": 181,"location":[54.685856, 25.281992]},{"id": 183,"location":[54.681682, 25.292441]},{"id": 185,"location":[54.676300, 25.292420]},{"id": 186,"location":[54.684549, 25.277140]},{"id": 187,"location":[54.677009, 25.285071]},{"id": 189,"location":[54.684012, 25.288001]},{"id": 190,"location":[54.679161, 25.287042]},{"id": 191,"location":[54.675749, 25.288050]},{"id": 194,"location":[54.680044, 25.280552]},{"id": 195,"location":[54.676440, 25.286386]},{"id": 193,"location":[54.683943, 25.279566]},{"id": 176,"location":[54.687952, 25.276155]},{"id": 180,"location":[54.592051, 25.057288]},{"id": 192,"location":[54.682603, 25.281333]},{"id": 177,"location":[54.680198, 25.282857]}]}

and i get

{
    "code": 3,
    "error": "Source point(s) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18] out of bounds: 25.272143,54.709692; 25.26989,54.69305; 25.289531,54.68374; 25.293319,54.685166; 25.281992,54.685856; 25.292441,54.681682; 25.29242,54.6763; 25.27714,54.684549; 25.285071,54.677009; 25.288001,54.684012; 25.287042,54.679161; 25.28805,54.675749; 25.280552,54.680044; 25.286386,54.67644; 25.279566,54.683943; 25.276155,54.687952; 25.057288,54.592051; 25.281333,54.682603; 25.282857,54.680198. Destination point(s) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18] out of bounds: 25.272143,54.709692; 25.26989,54.69305; 25.289531,54.68374; 25.293319,54.685166; 25.281992,54.685856; 25.292441,54.681682; 25.29242,54.6763; 25.27714,54.684549; 25.285071,54.677009; 25.288001,54.684012; 25.287042,54.679161; 25.28805,54.675749; 25.280552,54.680044; 25.286386,54.67644; 25.279566,54.683943; 25.276155,54.687952; 25.057288,54.592051; 25.281333,54.682603; 25.282857,54.680198"
}

Assuming you are working on Vilnius locations , same answer might be a solution make sure you use long,lat coordinates

1 Like

Thanks already fixed

1 Like