i am new to arcgis and am trying to calculate the driving distances between 2 sets of xy coordinates.
i have a data set with 5 columns--id, x-origin, y-origin, x-destination, y-destination--and would like to create a new showing the driving distance between the respective xy coordinates.
i was told that this might be possible using network analyst but have never worked with that tool.
any help would be appreciated!
If I understand your objective correctly, you want to find the driving distance from one specific origin to one specific destination, not from all origins to all destinations. This is important because, at first glance, you might think the OD cost matrix solver would work best, but actually it's probably best to do the following using a route layer instead:
1. On your dataset, create a new field named RouteName and calculate its value so that it is the same value as your current ID field.
2. Add your origins to ArcMap as a layer. (Tip: File > Add Data > Add XY Data.) Only specify the origin X and Y fields.
3. Rename the output layer that appears in the table of contents to something like Origins.
4. Add your destinations to ArcMap as a layer. Only specify the destination X and Y fields.
5. Rename the output layer to Destinations.
6. Make a Route layer using the Network Analyst toolbar (or a GP tool).
7. Load the Origins layer into the Stops class. (Tip: Right-click Stops in the Network Analyst window and choose Load Locations.) Make sure the RouteName field is mapped to the RouteName field you created.
8. Load the Destinations layer into the Stops class using the same method.
By specifying the route name when loading, the stops are grouped together and routes are calculated only for the stops that are in the same group, which in your case is limited to a single origin and destination pair.
You can open, and optionally export, the Routes class, which contains the calculated shortest-path driving distances. The Name field values will match the values of your original IDs.
"The network dataset has no edge elements. It may be unbuilt."
"The network dataset has no edge elements. It may be unbuilt." I have this same problem. And the status in the properties says it is unbuilt. But when I try to build it I get another error saying 'ND cannot be built. Network object evaluation error'. What mistake am I doing could please guess? I have a normal street network of a city with edge elements. N Im building this network dataset from a shapefile and not in a feature dataset.
As the message says, the problem is with the network dataset and not with the route layer.
If the network has no edges perhaps it needs to be "built". Also if it has no edges then the
stops you loaded have no where to snap to and will need to be re-loaded or their locations
re-calculated once the edges are there.
You mention that you created and build the network. When you add the network dataset to
ArcMap, say NO to adding the source features. Now, does anything draw? Or if you bring
up the properties of the network dataset, what does it say on it's status?