1

After finding the closest facilities to a given start point using the "Make Closest Facility Layer" tool, how can I select the result such that I can display just the closest facilities on the map?

Below is the model that I have so far. The problem is with the last two steps. When I use the select data tool, there is no option to select only the closest facilities. That means when I copy the features, it makes a copy of ALL the facilities and the resulting feature set is totally unhelpful to someone trying to see where the closest facility is.

Find closest facilities model.

  • There may be a parameter somewhere in the solver as to the number of facilities to return. Or, If there is a distance field, run a select by attribute using a subquery with the MIN function before the copy – Ben S Nadler Nov 4 '17 at 17:12
  • Thanks Ben-- I thought there would be such a parameter too but there isn't. The solver also doesn't seem to create any kind of distance field. I don't understand how you are supposed to use this tool programatically or in a model. It seems like it can only be used visually :/ – lucas Nov 5 '17 at 11:25
  • Does the output route layer have any reference to the facility ID? It has been some time since I used that specific function but generally the tools are good of keeping track of those in the outputs – Ben S Nadler Nov 5 '17 at 16:01
1

If your "closest facilities" is a subset of your "facilities" input layer/model parameter (that is, the features are exactly the same, they are just a selected few of them), then if you are running the "select" tool you won't be able to pick them out, unless you have an SQL query where you specifically list them out.

The easy way to do that is to use "Select By Location" instead of "Select", and then you can select only the facilities intersecting the closest facilities layer (no search radius is required, as the features will be one-to-one on top of each other).

The harder way, unnecessary for your purposes, would be to include a quick arcpy script as a model step, that queries each object ID of the closest facilities and adds this list as a parameter (via SQL query) to the Select tool in your original model. But using Select By Location seems like it would make more sense.

  • Thanks AlecZ. That's exactly the problem: the closest facilities are a subset of facilities that I am trying to identify using the Make Closest Facilities Layer tool. I can't figure out how it identifies them however, besides visually: it creates a route feature that leads to the closest facility, but doesn't seem to mark that facility in any way. – lucas Nov 5 '17 at 11:27
  • If that's the case, a simple workaround might be to include a search radius of, say, 100 meters in a final "select by location" process, which would include the buildings close to those routes. However, it sounds then that your input parameters are switched in the very first process - the output should be a subset of buildings, close to the street features in sequence, not the other way around. – AlecZ Nov 5 '17 at 16:48
  • Perhaps select by attribute to get shortest route then select by location to get facility? – Ben S Nadler Nov 9 '17 at 6:10
0

For use the closest facilities at the route you have 2 options:

  1. Select by location, you can select by location the facilities that intersect with the routes that closest facilities already create.

The problem of this one is that if they are not intersecting you have to use the buffer option into the tool but it is not accurate (ex. you can select more than one facilities and the buffer distance will depend on each project)

  1. Create a join with routes and facilities that are joined by ObjectID (facility) and FacilityID (route), so selecting by attribute you can select the facility with the route.FacilityID not null.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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