Solve closest facility


Purpose
This sample application demonstrates how to programmatically perform a closest facility analysis using the fine grained ArcObjects application programming interface (API). It shows how to load facilities and incident locations from a feature class, set solver parameters, execute the analysis, and obtain the output results.

How to use

See How to use ArcGIS samples for help on running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Run the SolveClosestFacility application. A dialog panel and a map bean open in the application window.
  2. Modify the Cost Attribute, Target Facility Count, and Cut Off values if required, and optionally, select Hierarchy and Restrictions.
  3. Click the Find Closest Facility button. The Closest Facility Solver solves the network using the values entered and shows the closest facilities, along with a route, in the map panel.


Download the files for Java
networkanalyst/SolveClosestFacility.java Main class




Development licensing Deployment licensing
Engine Developer Kit Engine Runtime: Network
ArcView: Network Analyst