4 Replies Latest reply on Sep 25, 2012 7:47 AM by pauls19

    adding a global turn restriction from a feature class attribute.

    rostwald
      Hi,

      I've set up a network dataset in 9.2, but I'm having difficulty defining turning restrictions based on field values in the roads attribute table.  In the attribute table for the roads there are 4 fields which describe if a left turn or right turn is restricted in the from-to direction and to-from direction based on digitized direction.  How can I create a restriction attribute in the network dataset that evaluates the turn as restricted or not??  I thought you could use the turn.angle in an expression but the fields that contain the restriction are not listed?  I've read the online help page and do not want to create a turn feature class because the values are already stored in the road centreline feature class. 

      thanks for your help,

      Rob O.
        • Re: adding a global turn restriction from a feature class attribute.
          rostwald
          Hi Alan,
          thanks for your response, but I'm not sure if I follow what your suggesting.  I tried creating a network description attribute called left restriction. I used a field expression to get the value from the feature class that indicates if a left restriction occurs in the digitized direction and opposite. In the default values tab under turns I used the vbscript below:
          restricted = false
          a = Turn.Angle
          If a > 210 And a < 330 Then
            If toEdge.AttributeValueByName( "Left Restriction" ) = "LR" Then
              restricted = True
            End If
          End If

          this script did not work.  I'm not clear how to use the element variable and methods.  I have minimal programming experience.
          If a road feature class has attributes that indicate turn restrictions is there an alternative way to apply this to the network without manually creating a turn feature class?  Creating a turn feature class is just not feasible in my situation.

          thanks,

          rob
          • Re: adding a global turn restriction from a feature class attribute.
            rostwald
            Hi I tried your suggestions and the scripts validate correctly but still does not create a restriction when testing using a route between 2 locations.  I've attached screen shots of the network attributes and evaluator scripts.

            thanks again,
            • Re: adding a global turn restriction from a feature class attribute.
              rostwald
              Hi Alan,

              I got it to work

              thanks!
              • Re: adding a global turn restriction from a feature class attribute.
                pauls19
                Hi !
                I have a similar problem.
                I was just wondering if there is a possibility to detect changes in an attribute between 2 via turn connected edges?

                For example i have a multimodal network and i want to add a delay to all possible turns that don't follow the same public transport line i'm currently driving. (e.g. changing from Bus A to another edge with Bus A will cause no delay but changing from Bus A to Bus B will cause one)

                is there a way to access within a junction evaluator not only the angle but also 1 attribute of the source and one of the destination edge?

                Thanks
                Regards,
                Paul