# OpenRouteService - Null Durations & Route Not Found Errors

**URL:** https://ask.openrouteservice.org/t/openrouteservice-null-durations-route-not-found-errors/5783
**Category:** openrouteservice
**Created:** [February 19, 2024, 8:38am UTC](https://ask.openrouteservice.org/t/openrouteservice-null-durations-route-not-found-errors/5783 "2024-02-19T08:38:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![PizzaLion](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/pizzalion/32/2828_2.png) [@PizzaLion](https://ask.openrouteservice.org/u/PizzaLion)
#### Post date: [February 19, 2024, 8:38am UTC](https://ask.openrouteservice.org/t/openrouteservice-null-durations-route-not-found-errors/5783/1 "2024-02-19T08:38:42Z")

</div>

Dear OpenRouteService Team,

I am writing to you today with a few questions about the OpenRouteService API.

- Engine Version: 7.0.1
- PBF Country: Thailand

I am experiencing two issues:

Question 1:  
I am using the /ors/v2/matrix/driving-car endpoint with the following configuration:  
locations: [list of coordinates]  
metrics: [“distance”, “duration”]

However, the durations field in the response contains null values for some of the coordinates.

What are the possible reasons for these null values, and how can I resolve this issue?

I have attached the body of the request that produces the null values:

[  
{“locations”:[[100.4406842,13.6646259],[100.5472935,13.7207788],[100.4549178,13.672582],[100.4911333,13.7333894],[100.4077204,13.688454],[100.4451269,13.715188],[100.4502445,13.7168635],[100.4478842,13.7166886],[100.4381487,13.714436],[100.4428476,13.7668402],[100.4426168,13.7669133],[100.5017627,13.7043782],[100.5029245,13.7046623],[100.5034903,13.7037592],[100.4430683,13.7001881],[100.4364164,13.6929669],[100.4793413,13.7763941],[100.4451265,13.6844825],[100.4289157,13.66287],[100.4159157,13.6684503],[100.4144485,13.6676528],[100.363518,13.7329861],[100.525591,13.7231355],[100.351967,13.7059138],[100.3406896,13.6979043],[100.5170636,13.7192151],[100.5409197,13.724455],[100.5340588,13.6717048],[100.3800182,13.623927],[100.5276979,13.7221206],[100.5213735,13.7227477],[100.4457618,13.7380391],[100.4134282,13.7908714],[100.4916562,13.7443017],[100.5441476,13.7074199],[100.4605769,13.7538019],[100.3958531,13.7362763],[100.5278167,13.7220062],[100.3369634,13.740215],[100.5277384,13.7218498],[100.5501196,13.7187064],[100.4757159,13.7796271],[100.4909767,13.726515],[100.4441617,13.6440839],[100.4982003,13.736335],[100.5171765,13.7191791],[100.5474008,13.7206914],[100.4663971,13.6687241],[100.5267205,13.7128195],[100.5300041,13.7212082],[100.5099163,13.7360259],[100.4425919,13.7425709],[100.5479128,13.7133962],[100.5370097,13.7229806],[100.4545936,13.7389277],[100.4969307,13.6522601],[100.4425437,13.7445735],[100.5429956,13.673009],[100.4628895,13.7153831],[100.4626824,13.7159974],[100.4909588,13.7054755],[100.5078625,13.7187194],[100.4825865,13.6499629],[100.4960972,13.7268642],[100.5092212,13.7235515],[100.5285441,13.7238633],[100.5286889,13.7239636],[100.5287245,13.7238763],[100.5380157,13.698085],[100.5376401,13.6980902],[100.5375516,13.697496],[100.5413536,13.6968588],[100.5376636,13.7212418],[100.4109797,13.521561],[100.5225371,13.7026027]],“metrics”:[“distance”,“duration”]}]  
]

Question 2:

When I use the /ors/v2/directions/driving-car endpoint with the following coordinates, I receive the error message:

“Route could not be found - Unable to find a route between points 6 (100.4077204 13.6884540) and 7 (100.4425437 13.7445735)”  
However, there is a road connecting these two points in Google Maps.

Why is this error message appearing, and how can I resolve it?

I have attached the coordinates that are causing the error:

[  
{“coordinates”:[[100.53944,13.73945],[100.3369634,13.740215],[100.4289157,13.66287],[100.4159157,13.6684503],[100.3406896,13.6979043],[100.4077204,13.688454],[100.4425437,13.7445735],[100.4451269,13.715188],[100.4425919,13.7425709],[100.4134282,13.7908714],[100.4451265,13.6844825],[100.363518,13.7329861],[100.4406842,13.6646259],[100.4430683,13.7001881],[100.351967,13.7059138],[100.3958531,13.7362763],[100.3800182,13.623927],[100.4364164,13.6929669],[100.4144485,13.6676528],[100.4381487,13.714436],[100.53944,13.73945]]}  
]

I would appreciate any help you can provide in resolving these issues.  
Thank you for your time and consideration.

---

<div class="post-metadata">

### Author: ![jschnell](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/jschnell/32/971_2.png) [@jschnell](https://ask.openrouteservice.org/u/jschnell)
#### Post date: [February 20, 2024, 8:45am UTC](https://ask.openrouteservice.org/t/openrouteservice-null-durations-route-not-found-errors/5783/2 "2024-02-20T08:45:06Z")

</div>

Hey,

as for question 1, zero andnull values may occur for two reasons:

1. the start- and endpoint are the same. You can easily see this in our API playground - the diagonal of the returned matrix has only zeroes.
2. no route could be found. This will enter a Null in your response. See the answer to the question below

As for question 2:  
Note, that the openrouteservice does not use Google Maps map data, but OpenStreetMap map data. There, point 7 is in an area that is only reachable by passing a `barrier=lift_gate` like this one: [Node: 10223375223 | OpenStreetMap](https://www.openstreetmap.org/node/10223375223)  
This prevents access to the area, since it’s tagged with `access=private`.

Best regards

---

<div class="post-metadata">

### Author: ![PizzaLion](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/pizzalion/32/2828_2.png) [@PizzaLion](https://ask.openrouteservice.org/u/PizzaLion)
#### Post date: [February 22, 2024, 7:48am UTC](https://ask.openrouteservice.org/t/openrouteservice-null-durations-route-not-found-errors/5783/3 "2024-02-22T07:48:14Z")

</div>

Thank you for your detailed response and the link. I appreciate your help.

I have an additional question about the second question I asked.

I understand that point 7 is inaccessible because it is “access=private”.

When using /ors/v2/directions/driving-car, are there any options to:

1. Calculate a route to another destination if “access=private” is included?
2. Ignore “access=private” and calculate the route?

If these options are available, could you please provide information on how to configure them in the config file or any additional settings that need to be made?

I appreciate your continued efforts and support for OpenRouteService.
