<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Network analyst - turn feature class in ArcMap Questions</title>
    <link>https://community.esri.com/t5/arcmap-questions/network-analyst-turn-feature-class/m-p/1048544#M2356</link>
    <description>&lt;P&gt;Sorry, i wrote the wrong code.&lt;BR /&gt;I used, tihis one:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;def Turn(value): &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;restricted = False&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if value == -1: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;restricted = True &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return&amp;nbsp;restricted&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;--------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Turn(!TURN!)&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 18 Apr 2021 13:36:21 GMT</pubDate>
    <dc:creator>MirjanaAndjelic</dc:creator>
    <dc:date>2021-04-18T13:36:21Z</dc:date>
    <item>
      <title>Network analyst - turn feature class</title>
      <link>https://community.esri.com/t5/arcmap-questions/network-analyst-turn-feature-class/m-p/1048541#M2355</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using ArcMao 10.7.1.&amp;nbsp;I have the following layers:&lt;/P&gt;&lt;P&gt;1. line - which are streets (attributes: ID, Name, Time, Length )&lt;/P&gt;&lt;P&gt;2. points - which are&amp;nbsp;&lt;SPAN&gt;crossroads (attributes: ID, Name)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. turn feature class -&amp;nbsp;which says about the prohibition of turning (attributes created by the archmap: ID, Shape, Edge1End, Edge1FCID, Edge1FID, Edge1Pos,Edge2End, Edge2FCID, Edge2FID, Edge2Pos... + TURN - which is 0 or -1 ).&amp;nbsp; &amp;nbsp;TURN attribute values mean: 0 - turning between the first line (id: Edge1FID) and the second line (id:&amp;nbsp;Edge2FID ) is allowed,&amp;nbsp; -1 - turning between the first line (id Edge1FID) and the second line (id: Edge2FID) is not allowed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I creatred: GDB, Feature Dataset and finally Network Dataset. In the Attribute tab, I created some new attributes: Length (which I am going to use as cost for calculating navigation), Time (which I am going to use as cost for calculating navigation) and Turn (which &lt;SPAN&gt;&amp;nbsp;will say about the prohibition of turning&lt;/SPAN&gt;).&amp;nbsp;&lt;BR /&gt;To define Turn, I usef Python code. In the Evaluators tab, I set: Source - Turn, Element -Turn, Type - Field and Value - expression (&lt;SPAN&gt;Python code below):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;python&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;----------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;defSetOneway(value):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; restricted = False&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if value = -1: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; restricted = True&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return restricted&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;--------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SetOneway("TURN")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When I started calculating the route, the program does not recognize the forbidden turns, which I defined via TURN. Does anyone know why?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Apr 2021 13:17:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/network-analyst-turn-feature-class/m-p/1048541#M2355</guid>
      <dc:creator>MirjanaAndjelic</dc:creator>
      <dc:date>2021-04-18T13:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: Network analyst - turn feature class</title>
      <link>https://community.esri.com/t5/arcmap-questions/network-analyst-turn-feature-class/m-p/1048544#M2356</link>
      <description>&lt;P&gt;Sorry, i wrote the wrong code.&lt;BR /&gt;I used, tihis one:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;def Turn(value): &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;restricted = False&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if value == -1: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;restricted = True &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return&amp;nbsp;restricted&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;--------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Turn(!TURN!)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Apr 2021 13:36:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/network-analyst-turn-feature-class/m-p/1048544#M2356</guid>
      <dc:creator>MirjanaAndjelic</dc:creator>
      <dc:date>2021-04-18T13:36:21Z</dc:date>
    </item>
  </channel>
</rss>

