Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am having a bit of a time figuring out a work around for a problem I have. Essentially, 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.

Any suggestions/comments would be much appreciated.

Thanks,

eric

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

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
    
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 Apr 11 '12 at 20:12
    
I'd do it with an ArcPy script using a select by building and then a subselct. –  MappaGnosis Apr 11 '12 at 21:53
    
Ah, unfortunately I do not have the Python skills necessary to do this. Thanks for the help though –  eric Apr 11 '12 at 22:16
1  
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! –  MappaGnosis Apr 11 '12 at 22:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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