Adding a cost for crossing a junction defined by a field

1687
13
10-12-2011 08:38 AM
GuillaumeBarreau
New Contributor
I have built a custom cost evaluator in my network data. One aspect of it relates to edges and I have no problem with that.

I would now like to complicate it and add a component of the cost linked to junctions. If, in the evaluators window, for that attribute and in the line that corresponds to junctions (the 3rd one) I add a constant value for junctions, I have the behaviour I want.

However, rather than a constant I would like this cost to be the value of a field which I plan to add to my junctions table (the table associated with the layer whose name ends with ND_junctions).  The "Field" type of evaluator is not available for the junction. Therefore I have tried going round this with the "VB script" type of evaluator but I failed miserably.

Could you let me know how I would set the cost for junctions to be field "F" in my table xxx_ND_junctions?

Thank you
Tags (2)
0 Kudos
13 Replies
JaySandhu
Esri Regular Contributor
A network dataset can only be created inside a feature dataset. So you need to create a geodatabase, then a new feature dataset (and set it's spatial reference to the streets feature class) and then import or copy all the feature classes into the feature dataset. Now you should be able to create the network dataset. The reason it needs to be in a feature dataset is so that all the sources making up a network should have the same spatial reference.

You can get more familliar with network capabilities by running through the tutorials for network dataset here:
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/About_the_ArcGIS_Network_Analyst_tutor...

Jay Sandhu
0 Kudos
GuillaumeBarreau
New Contributor
A network dataset can only be created inside a feature dataset. So you need to create a geodatabase, then a new feature dataset (and set it's spatial reference to the streets feature class) and then import or copy all the feature classes into the feature dataset. Now you should be able to create the network dataset. The reason it needs to be in a feature dataset is so that all the sources making up a network should have the same spatial reference.

Jay Sandhu


Hi Jay,

Just to let you know that I am working towards doing this but I haven't got there yet. I had a question though about why it is not possible to do it the way I originally tried. You said the junctions created automatically by the system cannot be modified. In fact, I was managing to modify the underlying table of the systems junction by adding a field to it. What I wasn't managing to do was to reference the value of that field in a function. So I imagine that what you meant is that the system junctions can be modified but that any extra field is not referencable from a function, correct? Would there be a way of putting this extra field information in a different table and then be able to reference it in a function? 

Thanks again,

Guillaume
0 Kudos
JaySandhu
Esri Regular Contributor
When I first replied I assumed you were using a network dataset built inside a geodatabase. You are using a shape file based network. Since the junctions created automatically is also a shape file nothing prevents you from editing it. But that does not mean the network dataset will support reading the extra fields. Once you move to a geodatabase we can enfore more rules on when you can edit, etc, thus you are preventing from modifying the system junctions.

Jay Sandhu
0 Kudos
GuillaumeBarreau
New Contributor
A network dataset can only be created inside a feature dataset. So you need to create a geodatabase, then a new feature dataset (and set it's spatial reference to the streets feature class) and then import or copy all the feature classes into the feature dataset. Now you should be able to create the network dataset. The reason it needs to be in a feature dataset is so that all the sources making up a network should have the same spatial reference.

Jay Sandhu


Hi Jay,

Following your instructions, I have managed to use a field of my own making as a cost in my junctions layer. Thanks very much again for your help.

Guillaume
0 Kudos