When using Network Analyst's "Closest Facility" tool, if the facilities and Incidents do not lie on the network line (road), the tool starts at the point on the network line closest to the Facility/Incident.

However, a portion of my data will not create a route due to dead end lines in my road network being closest to the points.

I would like the "Closest Facility" tool to utilize the next nearest road segment until it comes up with a possible shortest route path, as I need every incident to have some road distance to the facility, regardless of bad roads.

Is such a thing possible and if so how might one do it?

Background: 14,646 Incidents, 6 facilities, working with up to 200 km distances, 13,793 routes were generated.

edit: 12/13/16, 5:31 pm Please see how the well closest distance (red lines) connect to some isolated roads. I'm not quite sure how to encourage the tool to either ignore these isolated roads or reach for roads that have a path. enter image description here

  • By default, the search radius for NA layers is 5,000m. Increase it and your points should be routable.
    – Paul
    Commented Dec 5, 2016 at 21:46
  • @Paul, to be clear, increasing search radius will still face the trouble of snapping to the closest line, correct?
    – Red
    Commented Jun 14, 2017 at 22:21

1 Answer 1


Network Analyst's algorithm finds the closest network location to snap your facilities and incidents, it doesn't check if the location is connected to the rest of the network (in the real world, it could be disconnected for some reason). It is not supposed to find a route by all means. Snapping your points to a distant road section could return a meaningless route and would require a complicated logic.

If the network is not traversable because of the restriction attributes you've defined, then there shouldn't be a route.

And if as in your case the road is not connected to the rest of the network, you should clean up your network so that it is usable for analysis. You can either

  • Connect these isolated segments to the rest of the network,

  • Delete these isolated segments.

In both cases you can detect these standalone sections with a topology and the Must Not Have Dangles rule, then fix the issues as you prefer.


If your network is made up of many 'islands' and you decide to remove them to keep only the 'continental' network if I can use this analogy, there is a faster way that checking every single dangle found by a topology check:

  1. Dissolve the network. Don't set any Dissolve fields parameters, but make sure Create multipart features and Unsplit lines are checked. The former will allow non-linear segments to be dissolved (e.g. Y-shapes). The latter will create different features for disconnected parts of the network.
  2. You have now one feature per 'island'. If you want to remove everything but the 'continent', you can select the feature with the longest shape_length and delete the other ones (even though a simple visual check would normally allow you to quickly find the 'continent')
  3. Using Select by Location, select the features from the original network that interesct the 'continent'. Switch the selection and delete these other features. So you don't have to redesign a network, and more importantly you keep the road attributes (which are not maintained in the dissolved version of the network).
  4. Build the network, since it has been modified. It is now ready for analysis.
  • Hi GISGe, I have uploaded a photo with my problem and am having trouble deciding which topology tool I should use to remove the isolated segments -- as I think connecting segments will result in greater inaccuracies than simply letting the closest facility tool search farther.
    – Red
    Commented Dec 13, 2016 at 23:03
  • I attempted the method from edit. The number of features only dropped from 460,000 to 350,000, meaning that I could not identify one fat continent to use. I think part of the issue is that may roads cover half of Texas...
    – Red
    Commented May 22, 2017 at 21:37
  • I am attempting to use the OD cost matrix tool and have spotted the argument "snap to: First" have you ever used this?
    – Red
    Commented Jun 14, 2017 at 19:25
  • This setting is only relevant if you have mutliple sources for your network (I've never used it). See here for an explanation of the difference between 'first' and 'closest'
    – GISGe
    Commented Jun 15, 2017 at 6:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.