<?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: Route Layer Field Mappings in ArcGIS Network Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-network-analyst-questions/route-layer-field-mappings/m-p/442634#M4206</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply. Basicaly both store locations have the same coordinates. To be more specific i have one depot with name 101&amp;nbsp; and i want to create&amp;nbsp; two routes for that depot 1011 and 1012 respectively. So&amp;nbsp; i m copying the first row from depots shp and inserting that as a new row in the same .shp file naming the first depot as 1011 and the last as 1012. Maybe through that copy paste procedure the coordinates for the clone depot become "unreadable".&lt;/P&gt;&lt;P&gt;Is there any way to avoid doing that, by creating those two routes (1011&amp;amp;1012) without having two create two different depots and simply use one with RouteName 101?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jul 2018 15:33:27 GMT</pubDate>
    <dc:creator>sotokan80_</dc:creator>
    <dc:date>2018-07-25T15:33:27Z</dc:date>
    <item>
      <title>Route Layer Field Mappings</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/route-layer-field-mappings/m-p/442632#M4204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;I m using ArcGis 10.4.1 and network analyst extension where i create a Route Analysis layer.&amp;nbsp; The following code's part is used:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;#add a depot as stop.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt; fieldMappingsStore = arcpy.na.NAClassFieldMappings(outNALayer, stopsLayerName)&lt;BR /&gt; fieldMappingsStore["RouteName"].mappedFieldName = "Group_ID" #correlates fields ie naStops attribute table with inStores attribute table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;fig.1 stores attribute table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/415088_store.PNG" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#add stops&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt; fieldMappingsStops = arcpy.na.NAClassFieldMappings(outNALayer, stopsLayerName)&lt;BR /&gt; fieldMappingsStops["RouteName"].mappedFieldName = "Group_ID" #correlates fields ie naStops attribute table with inStores attribute table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;fig.2 stops attribute table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/415089_stops.PNG" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;#AddLocations_na&lt;BR /&gt; arcpy.na.AddLocations(outNALayer, stopsLayerName, inDepots, fieldMappingsStore,................)&lt;BR /&gt; arcpy.na.AddLocations(outNALayer, stopsLayerName, inOrders, fieldMappingsStops,.................)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;Apparently something is wrong with the above approach because the route layer is solved i get the following, where we can see that the first location for RouteName 1012 has SourceOID =-1 .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;SPAN&gt;fig.3 &lt;SPAN style="background-color: rgba(248, 248, 248, 0.6);"&gt;Route Analysis layer&amp;nbsp;&lt;/SPAN&gt;stops attribute table&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;IMG alt="" class="image-3 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/415090_final.PNG" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;IMG alt="" class="image-4 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/415091_final2.PNG" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;I don want want to use VRP because it is slower. Do i have to change my approach and merge the two shapefiles(stores and stops) or i can still use the above approach?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2018 08:18:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/route-layer-field-mappings/m-p/442632#M4204</guid>
      <dc:creator>sotokan80_</dc:creator>
      <dc:date>2018-07-25T08:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Route Layer Field Mappings</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/route-layer-field-mappings/m-p/442633#M4205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello sotokan80.&amp;nbsp; The problem here actually has nothing to do with field mapping.&amp;nbsp; Your field mapping looks fine (though you actually only need one field mapping object that you can use for both input tables).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you see a -1 for SourceOID and the icon with a ? on it, this means that the stop is unlocated.&amp;nbsp; Note that the Status field shows a status of 1, which means "Not located".&amp;nbsp; (Status 0 means "OK".)&amp;nbsp; For some reason, when you ran Add Locations, it could not determine the network location of that particular stop.&amp;nbsp; The stop is probably&amp;nbsp;far away from the network or something like that.&amp;nbsp; Perhaps the lat/long of the original point are incorrect, or perhaps the search distance you've used as an option in Add Locations is too small.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2018 15:07:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/route-layer-field-mappings/m-p/442633#M4205</guid>
      <dc:creator>MelindaMorang</dc:creator>
      <dc:date>2018-07-25T15:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: Route Layer Field Mappings</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/route-layer-field-mappings/m-p/442634#M4206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply. Basicaly both store locations have the same coordinates. To be more specific i have one depot with name 101&amp;nbsp; and i want to create&amp;nbsp; two routes for that depot 1011 and 1012 respectively. So&amp;nbsp; i m copying the first row from depots shp and inserting that as a new row in the same .shp file naming the first depot as 1011 and the last as 1012. Maybe through that copy paste procedure the coordinates for the clone depot become "unreadable".&lt;/P&gt;&lt;P&gt;Is there any way to avoid doing that, by creating those two routes (1011&amp;amp;1012) without having two create two different depots and simply use one with RouteName 101?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2018 15:33:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/route-layer-field-mappings/m-p/442634#M4206</guid>
      <dc:creator>sotokan80_</dc:creator>
      <dc:date>2018-07-25T15:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Route Layer Field Mappings</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/route-layer-field-mappings/m-p/442635#M4207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The easiest thing might be to do this: In your original depot shapefile, add fields for RouteName1 and RouteName2, then use the Field Calculator to make them be 1011 and 1012, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your python script, do Add Locations once to add the depots the first time, and use field mapping to map RouteName1 to the RouteName Stops property.&amp;nbsp; Then, do Add Locations again to add the depots a second time, this time mapping RouteName2 to the RouteName Stops property.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2018 16:30:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/route-layer-field-mappings/m-p/442635#M4207</guid>
      <dc:creator>MelindaMorang</dc:creator>
      <dc:date>2018-07-25T16:30:02Z</dc:date>
    </item>
  </channel>
</rss>

