# Closest Arc Snapping

While calculating route, boundary, or matrix for a given segment, if the start or end
points lie off the road network, the ERM attempts to find the closest segment near the
start and end points. In this extended calculation, the ERM considers the geometrically
closest segments. In this approach, if the closest segment is restricted for routing, an
error is received -- “Path could not be calculated” in case of the route. The same error
is received when the matrix and circular boundary is calculated according to
*maxOffRoadDistance* for the polygon.

The following solution attempts to improve the find closest segment snapping logic that
ignores the closest restricted arcs and provides you the next-best-possible
route.

Note: This change is applicable and effective only in scenarios where the closest
arcs near start or end points are restricted.