0

I am trying to figure out a work around for a problem I have.

I ran a Closest Facility operation on a set of about 200 points. Each point is an entrance to a building, and the underlying network is walking paths. I have named each of my facilities and incidents based on building number, and ran the operation so that each building was a facility as well as an incident, producing routes to and from each building.

What I am looking for is for any given path, (1-2, 1-3, etc.), I would like the shortest route (in time). In the Route output, there are routes for each entrance. For example if building 1 has four entrances, there will be four routes from building 1 to building 2. I only want the shortest (time-wise) for each route.

This is where I thought I would be able to use the Delete Identical tool. I advanced sorted the table, first based on the name of the route, then on the travel time. After this sort, the first unique record for each route name (1-2) had the shortest time. However, Delete Identical appears to delete all but the lowest Object_ID. This is a problem because as the routes were created and subsequently exported, they did not go in the order that I want now, so the lowest Object_ID is not always the shortest time for a specific building to building route.

I'm using ArcGIS 10, with an ArcInfo license.

2 Answers 2

1

Why not simply export your shortest paths to a new feature class instead of deleting the other ones? The advantage of this approach, apart from getting around the problem, is that you don't destroy all your work in finding the time along other routes. I have a pathalogical hatred of throwing data away :) You could get into all sorts of 'what if' scenarios with it (supposing they closed off an entrance? Are all entrances open at all times of day? and so on)!

If you MUST delete them, you could do it with a simple ArcPy script.

4
  • The problem with this is that I need to select out the shortest path for each set of paths for each building-to-building scenario. So for a scenario between building 1 and 2, there might be a 15 foot route, 20 foot route, or 30 foot route, depending on the entrance. I only want the 15 foot route from building 1-2. For a building 3 to 4, the shortest path might be 90 feet, etc. If you know of a way to select like this, that would be much appreciated, but I figured out a work around where I exported the table to a CSV and resorted the Object IDs and then re-exported the table to solidify the OID
    – eric
    Commented Apr 11, 2012 at 20:12
  • I'd do it with an ArcPy script using a select by building and then a subselct. Commented Apr 11, 2012 at 21:53
  • Ah, unfortunately I do not have the Python skills necessary to do this. Thanks for the help though
    – eric
    Commented Apr 11, 2012 at 22:16
  • 2
    I encourage you to have a go! Python is a relatively easy language and very high level. KNowing Python will open a lot of doors in GIS because of all the APIs for it (including GDAL, Shapely, ArcPy). The ESRI documentation is very good and includes many snippets of example code. Go for it! Commented Apr 11, 2012 at 22:43
1

Someone has brought to my attention a tool that performs the task I wished to perform. If using ArcGIS 10.0, the "Sort" tool creates a new feature class with new OIDs that are in the sorted order.

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.