Combine turn features in a network dataset

124
2
05-31-2010 02:59 AM
Highlighted
New Contributor
Hello,

Does anyone know if it is possible to combine two turn feature classes to obtain one condition for turning?
My example: I have one turn feature class for cars. Another turn feature class for cyclists only contains features for situations where cyclists are excepted from the car's restriction. With other words: Cyclists are restricted for all turn feautures off the car's turn feature, but if a cyclist's turn feature exists on the some spot, the cyclists are allowed to turn.
Is there a solution with an evaluator script?

Thanks in advance,

Axel
Tags (2)
Reply
0 Kudos
2 Replies
Highlighted
New Contributor III
First, let me make sure I properly understand your situation.

  • You have a primary turns feature class (let's call this class "A") which you intend to represent "restricted turns" for cars.

  • You have a secondary turns feature class (let's call this class "B") which you intend to represent "allowed (i.e., non-restricted) turns" for cyclists.

  • The turn features from class B are a subset of turn features from class A.


Is this correct? If so, then the answer to your question is: yes, you can support this intended functionality. However, not in the way in which you are likely thinking.

One way to support this would be as follows:

  1. On your primary turns feature class (class A), add a new field called something like "Cyclist_Restricted" to represent whether a cyclist is restricted by this turn. The field can be of type short integer, and will only hold the values of 1 or 0 to represent logical true or false, respectively. Default all field values to 1 for true.

  2. For each turn feature in class A, if that turn feature also appears in class B, then change its "Cyclist_Restricted" field value to 0 (since you wish to "allow" these turns for cyclists, if they appear in class B).

  3. Add the turns class A to your network dataset (do not add turns class B, as you will no longer need it).

  4. Create two new restriction attributes on your network dataset: one called "Vehicles Restricted" and one called "Cyclists Restricted" (or something like that).

  5. For the "Vehicles Restricted" attribute, for your turns class A, setup a constant evaluator with a value of "Restricted".

  6. For the "Cyclists Restricted" attribute, for your turns class A, setup a field evaluator which reads the newly-added "Cyclist_Restricted" field of class A and returns "Traversable" (i.e., false) for a field value of 0 and "Restricted" (i.e., true) for a field value of 1.


This allows you to use and manage only one turns feature class. Now, during your analysis, when you are solving a route for a vehicle, then you should make sure to turn on the "Vehicles Restricted" restriction attribute (while turning off the "Cyclists Restricted" attribute), and vice-versa when you are solving for a cyclist.

Does this help? Let me know if you have any further questions about this.
Reply
0 Kudos
Highlighted
New Contributor
Hi,

This is exactly wath I needed! I didn't realise I could add information to a turn table and use it in a condition.

Meanwhile, I discovered that if I have to turn features (from two different feature classes) on the same place, one is defined as a constant restricted turn and the other as a constant traversable turn, the additional value is traversable. Logically, i didn't expect it, but it suits me well in my case.

But I think that your method is working better and is easier to modify.

Thanks a lot,

Axel

Axel
Reply
0 Kudos