<?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: add origin &amp;amp; destination locations from the same row to a route analysis layer in ArcGIS Network Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-network-analyst-questions/add-origin-amp-amp-destination-locations-from-the/m-p/439352#M4187</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You will need to do convert the table into "two" sets of locations. I can describe the steps and you can automate it in python. You can do this in ArcMap by first adding the excel table. Then use the "Add X Y data" option and create a new point feature class from the first set of coordinates, that is origin_x and origin_y and then repeate the above but using the destination_x and destination_y. Now you can load these one after the other as stops in a Route analysis layer but using the same id mapped to the "RouteName" property. That way, the same row will turn into a single route. You can load in additional points with the same id as more legs of that route. The only thing you have to watch out is the "order". As long as your data is sorted on ID and Leg it should be fine. Try it out in ArcMap and then automate in python using the equivalten GP tools.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jay Sandhu&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Oct 2010 15:33:19 GMT</pubDate>
    <dc:creator>JaySandhu</dc:creator>
    <dc:date>2010-10-18T15:33:19Z</dc:date>
    <item>
      <title>add origin &amp;amp; destination locations from the same row to a route analysis layer</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/add-origin-amp-amp-destination-locations-from-the/m-p/439350#M4185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have an excel table with trips where the origin and destination locations are in the same row. I now want to add these locations to a route analysis layer (shortest route analysis) using Python. Each trip has an id. For some trips, more than one row exist (say: the trips has more than one leg, see example). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have an idea how do this with a Python script?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;id&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; leg&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; origin_x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; origin_y&amp;nbsp;&amp;nbsp;&amp;nbsp; destination_x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; destination_y &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;------------------------------------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x00001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y00001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x00002&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y00002 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x00002&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y00002&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x00003&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y00003 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x00003&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y00003&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x00004&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y00004 &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;Note: the origin coordinates of leg 2 and 3 are the same as for the destination of the previous leg. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2010 14:46:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/add-origin-amp-amp-destination-locations-from-the/m-p/439350#M4185</guid>
      <dc:creator>MartinaRagettli</dc:creator>
      <dc:date>2010-09-01T14:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: add origin &amp; destination locations from the same row to a route analysis layer</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/add-origin-amp-amp-destination-locations-from-the/m-p/439351#M4186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is very easy. Do you mean you want to add only the final and initial point of the trip and use shortest path analysis for finding the trip routes ? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This very table can be used, provided you use Node IDs (or coordinates). Do you already have a solution? Else I can tell you how.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sriram&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Botswana/ Rwanda&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Oct 2010 13:18:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/add-origin-amp-amp-destination-locations-from-the/m-p/439351#M4186</guid>
      <dc:creator>RamB</dc:creator>
      <dc:date>2010-10-16T13:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: add origin &amp; destination locations from the same row to a route analysis layer</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/add-origin-amp-amp-destination-locations-from-the/m-p/439352#M4187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You will need to do convert the table into "two" sets of locations. I can describe the steps and you can automate it in python. You can do this in ArcMap by first adding the excel table. Then use the "Add X Y data" option and create a new point feature class from the first set of coordinates, that is origin_x and origin_y and then repeate the above but using the destination_x and destination_y. Now you can load these one after the other as stops in a Route analysis layer but using the same id mapped to the "RouteName" property. That way, the same row will turn into a single route. You can load in additional points with the same id as more legs of that route. The only thing you have to watch out is the "order". As long as your data is sorted on ID and Leg it should be fine. Try it out in ArcMap and then automate in python using the equivalten GP tools.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jay Sandhu&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Oct 2010 15:33:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/add-origin-amp-amp-destination-locations-from-the/m-p/439352#M4187</guid>
      <dc:creator>JaySandhu</dc:creator>
      <dc:date>2010-10-18T15:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: add origin &amp; destination locations from the same row to a route analysis layer</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/add-origin-amp-amp-destination-locations-from-the/m-p/439353#M4188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jay is right. I would suggest the same.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Oct 2010 15:38:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/add-origin-amp-amp-destination-locations-from-the/m-p/439353#M4188</guid>
      <dc:creator>RamB</dc:creator>
      <dc:date>2010-10-28T15:38:32Z</dc:date>
    </item>
  </channel>
</rss>

