<?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: how to calculate least cost path between all points in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-calculate-least-cost-path-between-all/m-p/548867#M7922</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Could you please expand on what you mean by the "definition query" of the Make Feature Layer tool?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;He means the where_clause parameter. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Also, should this tool be input into the model or should the temporary field be created beforehand? &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This tool would be used inside your model, run for each iteration. In ModelBuilder the expression would be something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"SITEID" = '%value_element_name%'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;where value_element_name is from the output of the iterator tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The help links Xander mentioned have some good examples.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Jul 2014 19:32:34 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2014-07-02T19:32:34Z</dc:date>
    <item>
      <title>how to calculate least cost path between all points</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-calculate-least-cost-path-between-all/m-p/548864#M7919</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;SPAN&gt;I have a dataset of 34 sites, and need to calculate the least cost path of each site to every other site in the dataset.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have managed to successfully run a model, however because I am using the same site input file for both site origin and site destination, the least cost path is each site to itself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a quick way to tell arcgis to not calculate the distance of a site to itself?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using arcgis 10.1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be greatly appreciated, as I don't want to create 33 dummy destination files, with each origin point removed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kat&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Oct 2013 20:58:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-calculate-least-cost-path-between-all/m-p/548864#M7919</guid>
      <dc:creator>KatMartin</dc:creator>
      <dc:date>2013-10-13T20:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate least cost path between all points</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-calculate-least-cost-path-between-all/m-p/548865#M7920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;I have a dataset of 34 sites, and need to calculate the least cost path of each site to every other site in the dataset.&lt;BR /&gt;I have managed to successfully run a model, however because I am using the same site input file for both site origin and site destination, the least cost path is each site to itself.&lt;BR /&gt;Is there a quick way to tell arcgis to not calculate the distance of a site to itself?&lt;BR /&gt;I am using arcgis 10.1.&lt;BR /&gt;Any help would be greatly appreciated, as I don't want to create 33 dummy destination files, with each origin point removed.&lt;BR /&gt;Thanks,&lt;BR /&gt;Kat&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Kat,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It sounds to me that you could solve this by using an iterator to loop over field values. In that case you would be executing your model several times, with only changing source and destinations. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Suppose you have a field with unique values (1 - 34) of your sources/destinations, then you can use the '&lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;Iterate Field Values&lt;/SPAN&gt;&lt;SPAN&gt;' for 33 times (skip the last). Each iteration will give you the value of a single source. By using this value in the definition query (&lt;/SPAN&gt;&lt;SPAN style="font-family:courier new;"&gt;UniqueValue = iterationValue&lt;/SPAN&gt;&lt;SPAN&gt;) of the tool '&lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//00170000006p000000"&gt;&lt;SPAN style="font-style:italic;"&gt;Make Feature Layer (Data Management)&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;' you can create a source layer (not a physical file) that only contains this single location. Use the Make Feature Layer tool again with a different definition query (&lt;/SPAN&gt;&lt;SPAN style="font-family:courier new;"&gt;UniqueValue &amp;gt; iterationValue&lt;/SPAN&gt;&lt;SPAN&gt;) to create the destination layer. Execute the cost distance with these layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Some reading on iterators:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//002w0000001w000000"&gt;A quick tour of using iterators&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/Examples_of_using_iterators_in_ModelBuilder/00400000001n000000/"&gt;Examples of using iterators in ModelBuilder&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Xander&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 06:48:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-calculate-least-cost-path-between-all/m-p/548865#M7920</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2013-10-14T06:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate least cost path between all points</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-calculate-least-cost-path-between-all/m-p/548866#M7921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Kat,&lt;BR /&gt;&lt;BR /&gt;It sounds to me that you could solve this by using an iterator to loop over field values. In that case you would be executing your model several times, with only changing source and destinations. &lt;BR /&gt;&lt;BR /&gt;Suppose you have a field with unique values (1 - 34) of your sources/destinations, then you can use the '&lt;SPAN style="font-style:italic;"&gt;Iterate Field Values&lt;/SPAN&gt;' for 33 times (skip the last). Each iteration will give you the value of a single source. By using this value in the definition query (&lt;SPAN style="font-family:courier new;"&gt;UniqueValue = iterationValue&lt;/SPAN&gt;) of the tool '&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//00170000006p000000"&gt;&lt;SPAN style="font-style:italic;"&gt;Make Feature Layer (Data Management)&lt;/SPAN&gt;&lt;/A&gt;' you can create a source layer (not a physical file) that only contains this single location. Use the Make Feature Layer tool again with a different definition query (&lt;SPAN style="font-family:courier new;"&gt;UniqueValue &amp;gt; iterationValue&lt;/SPAN&gt;) to create the destination layer. Execute the cost distance with these layers.&lt;BR /&gt;&lt;BR /&gt;Some reading on iterators:&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//002w0000001w000000"&gt;A quick tour of using iterators&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/Examples_of_using_iterators_in_ModelBuilder/00400000001n000000/"&gt;Examples of using iterators in ModelBuilder&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;&lt;BR /&gt;Xander&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Xander,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you please expand on what you mean by the "definition query" of the Make Feature Layer tool? Also, should this tool be input into the model or should the temporary field be created beforehand? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ashley Manning&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 16:37:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-calculate-least-cost-path-between-all/m-p/548866#M7921</guid>
      <dc:creator>AshleyManning</dc:creator>
      <dc:date>2014-07-01T16:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate least cost path between all points</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-calculate-least-cost-path-between-all/m-p/548867#M7922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Could you please expand on what you mean by the "definition query" of the Make Feature Layer tool?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;He means the where_clause parameter. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Also, should this tool be input into the model or should the temporary field be created beforehand? &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This tool would be used inside your model, run for each iteration. In ModelBuilder the expression would be something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"SITEID" = '%value_element_name%'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;where value_element_name is from the output of the iterator tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The help links Xander mentioned have some good examples.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 19:32:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-calculate-least-cost-path-between-all/m-p/548867#M7922</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2014-07-02T19:32:34Z</dc:date>
    </item>
  </channel>
</rss>

