POST
|
Unfortunately, there is no easy way to get a traversal result via python at 10.0. We addressed the issue at 10.1. To do it at 10.0, your best bet would be to create a custom GP tool. That way, you could reference it from within the same process as you execute your python script. There is documentation about custom GP tools in the SDK. If you are comfortable in geoprocessing and in .NET ArcObjects development, you will create a GP tool using the relevant parts from the traversal result add-in .NET code. That's a bit out of my skill-set unfortunately. I'll have to wait for the 10.1 release. Is there any time-frame for it?
... View more
09-29-2011
01:22 AM
|
0
|
0
|
201
|
POST
|
Hi again Jay, So essentially I need a shapefile of points, and a shapefile of lines, and then follow the network analyst tutorial here? http://help.arcgis.com/en/arcgisdesktop/10.0/pdf/network-analyst-tutorial.pdf (I realise I'm simplifying alot!) James
... View more
09-28-2011
08:12 AM
|
0
|
0
|
652
|
POST
|
Not that add-in directly. You could take the original code (it's in the SDK) and turn it into a standalone executable then be able to call it from Python. At 10.1 we are adding this as a GP tool. So you could sign up for 10.1 beta and try it out! Jay Sandhu I don't know how to do the bit in bold unfortunately. I've wrote a fairly long process in a python script now, and the only bit is missing is the add traversal bit. 😞 Signing up to be a beta for 10.1 is a bit problematic too - I'm in a large organisation and so don't know our customer number. I'd also have to get our system admin guys to install the beta, which I don't think that they will be keen on really. Thanks for your help anyway.
... View more
09-28-2011
06:49 AM
|
0
|
0
|
201
|
POST
|
Hi Jay, Sorry to bother you again, but do you know if there is some way to access the traversal add-in using the Python window...? James
... View more
09-28-2011
06:02 AM
|
0
|
0
|
702
|
POST
|
Dear all, I realise that this is a complicated question, but could someone point me in the right direction for how I might build a Network dataset of the London Underground within ArcGIS 10 so that I can use the Network Analyst tools on it...? Thanks James
... View more
09-28-2011
05:58 AM
|
0
|
4
|
3653
|
POST
|
Hi guys, Some feedback... - arcpy.featureClassToShapefile_conversion("Sample_Routing\Routes", "E:\\") This appears to work, but then says it had a problem naming the output. Which is odd, as this isn't even a parameter in the code. - arcpy.CopyFeatures_management("Sample_Routing\Routes", "test") I didn't think that this would work, but it does. It makes a shapefile of the Routes and saves them to the default location. Note, there's no need for .shp in the code. -arcpy.FeatureClassToFeatureClass_conversion(in_features, out_path, out_name) - Although rather strangely named (how is feature to feature a conversion?), this also makes a shapefile as its output. So in summary, thanks! James
... View more
09-28-2011
02:26 AM
|
0
|
0
|
650
|
POST
|
Similar problem here. Trying to output a layer as a shapefile and get this error. 😞 Will try the geodatabase 'solution' now...
... View more
09-28-2011
02:10 AM
|
0
|
0
|
434
|
POST
|
I'll try this out later today - thank you very much!
... View more
09-28-2011
01:19 AM
|
0
|
0
|
650
|
POST
|
Hi James Well, I've managed to write the code that will loop through all your layers in the mxd remembering there names 'ListLayers' but I'm flumaxed as to how to export them. The saveas property of Layer exports everything to a layer file rather than a shapefile. sorry, I can't be more helpful. Claire Hey Claire, Thanks loads for trying to help. To be honest, maybe I'm asking the wrong question. At the end of using Network Analyst I'm given a 'Route'. If I right click on this, I can view the attribute table of the Route (there is just one row in my example but there could be more if I was using the Closest Facility tool instead). This table has has attributes such as FirstStopID, LastStopID, RouteName etc. What I want to do is to save this table somewhere, so that the next piece of my Python code can access the fields and do some additional processing. If anyone can suggest a way forward that would be great please. Thanks James
... View more
09-27-2011
07:41 AM
|
0
|
0
|
650
|
POST
|
Bring up the properties of the RoadLinks feature class. Then click on the Fields tab. It should show you all the fields that are present in your feature class. See if any of them are un-checked to hide them from view when you open the feature class. Most likely the ObjectID field has been turned off. if that is the case, check it on and now the values should be visible. Jay Sandhu Woohoo! Thank you Jay. I'm there now. I needed to join the field ObjectID in my network, with the SourceOID in the new edges dataset. I can now link my pollen counts through using this ID. Excellent. 🙂
... View more
09-27-2011
07:23 AM
|
0
|
0
|
702
|
POST
|
So you solve the CF and then run the AddIn. Once you have the Edges table, it has the OID of the streets. You can join it to that streets feature class and copy over your TOID to the edges table. Then you can Join it to your external table based on this TOID. Dear Jay, I'm struggling with the bit in bold. I have the Edges table, and I know how to do joins, however I'm not quite sure what the 'streets feature class' is in my example. The original network that was used is from the Ordnance Survey in the UK so I have the following within my network: Bridges FerryNodes Gates InferredTurnRestrictions mandatoryTurnRestrictions MiniRoundabouts MotorwayJunctions NetworkDatasetJunctions NetworkJunctions PartialRestrictions RisingBollards RoadLinks TrafficCalming TurnRestrictions I thought that I would join the Edges table that has been created using the addin, to the RoadLinks table from the original network, however the RoadLinks table does not contain the OID field. Please see the attached screenprint of my RoadLinks table.
... View more
09-27-2011
03:48 AM
|
0
|
0
|
702
|
POST
|
Hi, I'm sure that this is a very simple question, but I can't find the answer unfortunately. I have wrote a short Python script to do some geoprocessing, Network Analysis to be exact, and I want the routes that have been created from this process to be outputted as a Shapefile and saved to my PC - but using Python rather than right clicking and doing 'Data Export'. How do I go about this please? What is the Syntax? Thanks James
... View more
09-27-2011
02:59 AM
|
0
|
6
|
1459
|
POST
|
I have replied to this in the other thread: http://forums.arcgis.com/threads/37655-Finding-all-links-in-a-route?p=135000&posted=1#post135000 Basically use the traversal result addin from the ArcGIS resources to get to the table of all the edges traversed. Jay Sandhu Dear Jay, Thanks for the response. I have used the add-in as you suggest and now have 3 new tables; Edges, Turns and Junctions. Unfortunately none of these tables have brought through the field RoadLinkTOID, which is what I need to link to my external data. Is there someway for me to bring this through, or alternatively to link back from the Edges table to the Road_Links table (where the RoadLinkTOID is stored) ? Thanks for your help! James
... View more
09-21-2011
01:01 AM
|
0
|
0
|
260
|
POST
|
Dear Jay, I have a similar problem here if you wouldn't mind providing some assistance? http://forums.arcgis.com/threads/39825-Extract-TOIDs-from-route I have used the closest facility tool to create routes between my 10 origins and 10 destinations, but I would now like to join some external data to each of the routes. The external data are pollen levels detected on road sections, and a level is given for each road segment and stored using a TOID. I need to, either spatially or using the TOID, sum the pollen levels that each route has taken. Does that make sense? So lets say a route has gone along road ID 1, 2 and 3 and that these roads in my 3rd party data have pollen levels of 10, 10 and 15, the result should be a field which is the sum of 10, 10 and 15. By the way, I cannot find "The Edges table generated by the traversal result" ? Where is this? Thanks James
... View more
09-20-2011
04:45 AM
|
0
|
0
|
702
|
POST
|
Just been having a proper glance through the Forum history and came accross this: http://forums.arcgis.com/threads/37655-Finding-all-links-in-a-route Seems to be a similar problem. Will read up on it and the answers Jay suggests, but in the meantime if anyone has any ideas that would be appreciated.
... View more
09-20-2011
04:32 AM
|
0
|
0
|
260
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|