<?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 loop through geostatistical layers in a folder in ArcGIS GeoStatistical Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/loop-through-geostatistical-layers-in-a-folder/m-p/755844#M1679</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I'm trying to write a python script to loop through geostatistical layers in a folder (a snapshot is attached below), then loop through another folder which contains a&amp;nbsp; point shapefile (a snapshot attached as well), find the match between the two&amp;nbsp; based on names (e.g., 1a1a0.lyr vs 1a1a0 in the 'dateid' field), and last, use a 'GA layer to point' to the matching points. So how can I accomplish this task? More specifically, how do I create a nested loop to match the layers with the points of one shapefile?&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Sui&lt;/P&gt;&lt;P&gt;These are a sample of layers&lt;/P&gt;&lt;P&gt;&lt;IMG alt="layers.jpg" class="image-1 jive-image" height="373" src="https://community.esri.com/legacyfs/online/73894_layers.jpg" style="height: 373px; width: 560.063444108761px;" width="560" /&gt;&lt;/P&gt;&lt;P&gt;This is the attribute table of points&lt;/P&gt;&lt;P&gt;&lt;IMG alt="points.jpg" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/73994_points.jpg" style="width: 620px; height: 489px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 14 Mar 2015 04:25:41 GMT</pubDate>
    <dc:creator>SuiTao</dc:creator>
    <dc:date>2015-03-14T04:25:41Z</dc:date>
    <item>
      <title>loop through geostatistical layers in a folder</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/loop-through-geostatistical-layers-in-a-folder/m-p/755844#M1679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I'm trying to write a python script to loop through geostatistical layers in a folder (a snapshot is attached below), then loop through another folder which contains a&amp;nbsp; point shapefile (a snapshot attached as well), find the match between the two&amp;nbsp; based on names (e.g., 1a1a0.lyr vs 1a1a0 in the 'dateid' field), and last, use a 'GA layer to point' to the matching points. So how can I accomplish this task? More specifically, how do I create a nested loop to match the layers with the points of one shapefile?&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Sui&lt;/P&gt;&lt;P&gt;These are a sample of layers&lt;/P&gt;&lt;P&gt;&lt;IMG alt="layers.jpg" class="image-1 jive-image" height="373" src="https://community.esri.com/legacyfs/online/73894_layers.jpg" style="height: 373px; width: 560.063444108761px;" width="560" /&gt;&lt;/P&gt;&lt;P&gt;This is the attribute table of points&lt;/P&gt;&lt;P&gt;&lt;IMG alt="points.jpg" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/73994_points.jpg" style="width: 620px; height: 489px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Mar 2015 04:25:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/loop-through-geostatistical-layers-in-a-folder/m-p/755844#M1679</guid>
      <dc:creator>SuiTao</dc:creator>
      <dc:date>2015-03-14T04:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: loop through geostatistical layers in a folder</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/loop-through-geostatistical-layers-in-a-folder/m-p/755845#M1680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure of an arcpy method to list lyrs, but you can do so with os.listdir(). Then, loop through the list, creating a where clause. Finally, Select tool using where clause to extract matching points. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Mar 2015 16:03:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/loop-through-geostatistical-layers-in-a-folder/m-p/755845#M1680</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-03-14T16:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: loop through geostatistical layers in a folder</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/loop-through-geostatistical-layers-in-a-folder/m-p/755846#M1681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In 10.2 we introduced a Python class &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//018z000000n8000000" rel="nofollow noopener noreferrer" target="_blank"&gt;GeostatisticalDatasets&lt;/A&gt; which will make it easier for you to match up the datasets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;ga_layer = r"c:\temp\kriging.lyr"
geo_datasets = arcpy.GeostatisticalDatasets(ga_layer)
print geo_datasets
&amp;gt;&amp;gt;dataset1='c:\temp\myfc.shp' dataset1Field='ELEVATION'&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:04:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/loop-through-geostatistical-layers-in-a-folder/m-p/755846#M1681</guid>
      <dc:creator>SteveLynch</dc:creator>
      <dc:date>2021-12-12T08:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: loop through geostatistical layers in a folder</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/loop-through-geostatistical-layers-in-a-folder/m-p/755847#M1682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys for the reply. &lt;/P&gt;&lt;P&gt;Darren's answer is closer to what I want to achieve.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sui&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 06:30:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/loop-through-geostatistical-layers-in-a-folder/m-p/755847#M1682</guid>
      <dc:creator>SuiTao</dc:creator>
      <dc:date>2015-03-20T06:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: loop through geostatistical layers in a folder</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/loop-through-geostatistical-layers-in-a-folder/m-p/755848#M1683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I want to know if &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Python class &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/main/10.2/index.html#//018z000000n8000000" rel="nofollow" style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #287433; text-decoration: underline;" target="_blank"&gt;GeostatisticalDatasets&lt;/A&gt;​also existed in version 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 16:33:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/loop-through-geostatistical-layers-in-a-folder/m-p/755848#M1683</guid>
      <dc:creator>XIANWANG</dc:creator>
      <dc:date>2015-06-05T16:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: loop through geostatistical layers in a folder</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/loop-through-geostatistical-layers-in-a-folder/m-p/755849#M1684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It was first released in ArcGIS 10.2.&amp;nbsp; It is not in 10 or 10.1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 16:48:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/loop-through-geostatistical-layers-in-a-folder/m-p/755849#M1684</guid>
      <dc:creator>EricKrause</dc:creator>
      <dc:date>2015-06-05T16:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: loop through geostatistical layers in a folder</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/loop-through-geostatistical-layers-in-a-folder/m-p/755850#M1685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, here, we can do the loop? I mean I can chang dataset1 every time, then do the interpolation for the different dataset1?&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;/P&gt;&lt;DIV class="bar" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;P&gt;&lt;/P&gt;&lt;OL class="dp-py" start="1" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;ga_layer = r&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit;"&gt;"c:\temp\kriging.lyr"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;geo_datasets = arcpy.GeostatisticalDatasets(ga_layer)&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit;"&gt;print&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt; geo_datasets&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&amp;gt;&amp;gt;dataset1=&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit;"&gt;'c:\temp\myfc.shp' dataset1 Field='ELEVATION'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 22:05:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/loop-through-geostatistical-layers-in-a-folder/m-p/755850#M1685</guid>
      <dc:creator>XIANWANG</dc:creator>
      <dc:date>2015-06-09T22:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: loop through geostatistical layers in a folder</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/loop-through-geostatistical-layers-in-a-folder/m-p/755851#M1686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are using ArcGIS 10 or 10.1, you will need to pass the datasets using strings.&amp;nbsp; The GeostatisticalDatasets object will not work because it does not exist in 10 or 10.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For an example of the syntax of the string, see the code samples at the bottom of the ArcGIS 10 help topic:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Create_Geostatistical_Layer/003000000015000000/" title="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Create_Geostatistical_Layer/003000000015000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Create_Geostatistical_Layer/003000000015000000/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 17:45:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/loop-through-geostatistical-layers-in-a-folder/m-p/755851#M1686</guid>
      <dc:creator>EricKrause</dc:creator>
      <dc:date>2015-06-10T17:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: loop through geostatistical layers in a folder</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/loop-through-geostatistical-layers-in-a-folder/m-p/755852#M1687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot. I download Version 10.3 and I solved the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2015 13:42:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/loop-through-geostatistical-layers-in-a-folder/m-p/755852#M1687</guid>
      <dc:creator>XIANWANG</dc:creator>
      <dc:date>2015-06-11T13:42:39Z</dc:date>
    </item>
  </channel>
</rss>

