<?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 How to generate multiple paths between fixed source and destination points? in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/how-to-generate-multiple-paths-between-fixed/m-p/500775#M3395</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;Hello everybody,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;Does anybody know how I can generate multiple paths (not just least cost one) between two points? I want to have several alternatives of paths connecting two point in my map. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;I have an idea of writing a code with "for" loop and use "costPath" tool in each iteration and find LCP; then exclude the resulting LCP from the model prior to the next iteration and find a new LCP.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;I have no idea how to perform it!! Is there a way to do this algorithm in ArcMap by python scripting?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;&lt;SPAN style="color: #545454; font-family: arial, sans-serif; font-size: small;"&gt;I hope I am clear enough&lt;/SPAN&gt;&lt;SPAN style="color: #545454; font-family: arial, sans-serif; font-size: small;"&gt; to explain the issue.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: #545454; font-size: small; font-family: arial, sans-serif;"&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: #545454; font-size: small; font-family: arial, sans-serif;"&gt;Sara&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Nov 2014 23:46:46 GMT</pubDate>
    <dc:creator>SaraGhandehari</dc:creator>
    <dc:date>2014-11-17T23:46:46Z</dc:date>
    <item>
      <title>How to generate multiple paths between fixed source and destination points?</title>
      <link>https://community.esri.com/t5/developers-questions/how-to-generate-multiple-paths-between-fixed/m-p/500775#M3395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;Hello everybody,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;Does anybody know how I can generate multiple paths (not just least cost one) between two points? I want to have several alternatives of paths connecting two point in my map. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;I have an idea of writing a code with "for" loop and use "costPath" tool in each iteration and find LCP; then exclude the resulting LCP from the model prior to the next iteration and find a new LCP.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;I have no idea how to perform it!! Is there a way to do this algorithm in ArcMap by python scripting?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;&lt;SPAN style="color: #545454; font-family: arial, sans-serif; font-size: small;"&gt;I hope I am clear enough&lt;/SPAN&gt;&lt;SPAN style="color: #545454; font-family: arial, sans-serif; font-size: small;"&gt; to explain the issue.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: #545454; font-size: small; font-family: arial, sans-serif;"&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: #545454; font-size: small; font-family: arial, sans-serif;"&gt;Sara&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2014 23:46:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/how-to-generate-multiple-paths-between-fixed/m-p/500775#M3395</guid>
      <dc:creator>SaraGhandehari</dc:creator>
      <dc:date>2014-11-17T23:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate multiple paths between fixed source and destination points?</title>
      <link>https://community.esri.com/t5/developers-questions/how-to-generate-multiple-paths-between-fixed/m-p/500776#M3396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have done a similar analysis trying to obtain multiple routes between two points. What I did was to include in the next step the previous route as exclusion (NoData in the cost raster for a small buffer around the vectorized path). Make sure that for a small area around the start and end point you leave the cost values, since otherwise you will not get any result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Nov 2014 00:37:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/how-to-generate-multiple-paths-between-fixed/m-p/500776#M3396</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2014-11-18T00:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate multiple paths between fixed source and destination points?</title>
      <link>https://community.esri.com/t5/developers-questions/how-to-generate-multiple-paths-between-fixed/m-p/500777#M3397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Xander for your help,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know how I can relax the assumption of NoData in areas around start and destination?&lt;/P&gt;&lt;P&gt;I used the tool "Expand raster" to create a buffer around my LCP raster and set all cells in the buffer to NoData. I dont know to retain the values for area around start and destination.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2014 19:05:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/how-to-generate-multiple-paths-between-fixed/m-p/500777#M3397</guid>
      <dc:creator>SaraGhandehari</dc:creator>
      <dc:date>2014-11-19T19:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate multiple paths between fixed source and destination points?</title>
      <link>https://community.esri.com/t5/developers-questions/how-to-generate-multiple-paths-between-fixed/m-p/500778#M3398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I used a procedure which was vector based and consisted of the following steps:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Create a buffer of the vectorized route (with a small distance, but a least 1 pixel)&lt;/LI&gt;&lt;LI&gt;Create a buffer of the start and end points of the route (with a slightly larger buffer than the buffer around the route)&lt;/LI&gt;&lt;LI&gt;Erease the buffer of the start and end points from the buffer of the route&lt;/LI&gt;&lt;LI&gt;Use the remaining polygon to set NoData cells in the cost raster&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since your source and end points are raster, you can use the expand to create a raster holding the source and destination pixels and some pixels arround them. You also need the buffer of the route (or another expand raster on the raster that holds the pixels of the route) to combine them into a new cost raster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you want to do is create some map algebra that will do the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;When the expand of the source and destination cells is NoData,&lt;UL&gt;&lt;LI&gt;then verify if the route buffer is NoData, in that case assign the original cost raster values,&lt;/LI&gt;&lt;LI&gt;else assign nodata.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;in case the expand source and destination cells have a value, you should assign the origina cost raster.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose you have the following rasters:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;xpnd_src_dest&lt;/EM&gt; (raster result of appyling the expand to the source and destination cells)&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;xpnd_route&lt;/EM&gt; (raster result of applying the expand to the route cells)&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;cost_ras&lt;/EM&gt; (your original cost raster)&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;nd_ras&lt;/EM&gt; (a raster containing only NoData cells, I have had many problems with the SetNull function, therefore I use an alternative)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Map Algebra in the Raster Calculator would look something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Con(IsNull("xpnd_src_dest"), Con(IsNull("xpnd_route"), "cost_ras", "nd_ras"), "cost_ras")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will yield a cost raster that you can use in the next run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards, Xander&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2014 22:26:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/how-to-generate-multiple-paths-between-fixed/m-p/500778#M3398</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2014-11-19T22:26:08Z</dc:date>
    </item>
  </channel>
</rss>

