<?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 can I enumerate raster datasets in folder? in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-enumerate-raster-datasets-in-folder/m-p/1010433#M5882</link>
    <description>&lt;P&gt;Note that this also works for shapefiles when you supply "Shapefile" in the f.Type search string. I have read some posts saying that listing shapefiles in a&amp;nbsp;&lt;SPAN&gt;file system data store is not supported. Developing on 2.6.3.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Dec 2020 23:39:40 GMT</pubDate>
    <dc:creator>LesleyBross1</dc:creator>
    <dc:date>2020-12-16T23:39:40Z</dc:date>
    <item>
      <title>How can I enumerate raster datasets in folder?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-enumerate-raster-datasets-in-folder/m-p/769499#M549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I would like to enumerate raster datasets in folder where other process created them. Something like in ArcObjects:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pDatasets = pWorkspace.get_Datasets(esriDatasetType.esriDTRasterDataset);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have found information about GetItems here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Content-and-Items#items-and-factories"&gt;https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Content-and-Items#items-and-factories&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But I do not know how to get starting item from my folder path, what factory and what item to use.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jul 2019 15:06:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-enumerate-raster-datasets-in-folder/m-p/769499#M549</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2019-07-09T15:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: How can I enumerate raster datasets in folder?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-enumerate-raster-datasets-in-folder/m-p/769500#M550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gintautas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a Geodatabase object, you can call Geodatabase.GetDefinitions&amp;lt;RasterDatasetDefinition&amp;gt;. &amp;nbsp;This will return a list of RasterDatasetDefinition objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can tell you how to obtain a Geodatabase object if you tell me where you are starting from (e.g., FeatureLayer).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jul 2019 15:19:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-enumerate-raster-datasets-in-folder/m-p/769500#M550</guid>
      <dc:creator>RichRuh</dc:creator>
      <dc:date>2019-07-09T15:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: How can I enumerate raster datasets in folder?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-enumerate-raster-datasets-in-folder/m-p/769501#M551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;I am starting from folder path on disk. ArcMap application creates rasters and I use ArcGIS Pro to visualize them.&lt;/P&gt;&lt;P&gt;I have tried to create a new FileSystemDatastore using the FileSystemConnectionPath, but compiler can’t cast FileSystemDatastore to Geodatabase.&lt;/P&gt;&lt;P&gt;I think that I must add my folder to Project first ant then get back from Project my folder as FolderConnectionProjectItem.&lt;/P&gt;&lt;P&gt;Then use GetItems from FolderConnectionProjectItem to get my rasters and etc.&lt;/P&gt;&lt;P&gt;I will try to do that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jul 2019 15:29:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-enumerate-raster-datasets-in-folder/m-p/769501#M551</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2019-07-09T15:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: How can I enumerate raster datasets in folder?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-enumerate-raster-datasets-in-folder/m-p/769502#M552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;I think I found solution, but I don't know if it is the best. The way of enumerating I described in previous reply. This is code of my solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-family: Consolas; font-size: small;"&gt;// Add a folder to the Project&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas; "&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; folderToAdd = ItemFactory.Instance.Create(sResultsPath&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas; "&gt;await&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; QueuedTask.Run(() =&amp;gt; Project.Current.AddItem(folderToAdd &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas; "&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; IProjectItem));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: small; font-family: Consolas; "&gt;// find the folder project item&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; FolderConnectionProjectItem folder = Project.Current.GetItems&amp;lt;FolderConnectionProjectItem&amp;gt;().FirstOrDefault(f =&amp;gt; f.Path.Equals(sResultsPath&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt;, StringComparison.CurrentCultureIgnoreCase));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas; "&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; (folder == &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas; "&gt;null&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt;) &lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas; "&gt;return&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: small; font-family: Consolas; "&gt;// do the search&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; IEnumerable&amp;lt;Item&amp;gt; folderFiles = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas; "&gt;null&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas; "&gt;await&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; QueuedTask.Run(() =&amp;gt; folderFiles = folder.GetItems().Where(f =&amp;gt; f.Type == &lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas; "&gt;"Raster Dataset"&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt;));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas; "&gt;foreach&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; (Item item &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas; "&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; folderFiles)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;System.Diagnostics.Debug.WriteLine(item.ToString());&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2019 06:19:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-enumerate-raster-datasets-in-folder/m-p/769502#M552</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2019-07-10T06:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: How can I enumerate raster datasets in folder?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-enumerate-raster-datasets-in-folder/m-p/769503#M553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Go ahead and try it; it looks like it should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are investigating adding the ability to iterate through datasets of a file system data store, but that would be Pro 2.5 at the absolute earliest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2019 16:23:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-enumerate-raster-datasets-in-folder/m-p/769503#M553</guid>
      <dc:creator>RichRuh</dc:creator>
      <dc:date>2019-07-10T16:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: How can I enumerate raster datasets in folder?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-enumerate-raster-datasets-in-folder/m-p/769504#M554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;Thank you for information about the plans. My code works as I need for now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2019 05:48:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-enumerate-raster-datasets-in-folder/m-p/769504#M554</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2019-07-11T05:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: How can I enumerate raster datasets in folder?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-enumerate-raster-datasets-in-folder/m-p/1010433#M5882</link>
      <description>&lt;P&gt;Note that this also works for shapefiles when you supply "Shapefile" in the f.Type search string. I have read some posts saying that listing shapefiles in a&amp;nbsp;&lt;SPAN&gt;file system data store is not supported. Developing on 2.6.3.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 23:39:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-enumerate-raster-datasets-in-folder/m-p/1010433#M5882</guid>
      <dc:creator>LesleyBross1</dc:creator>
      <dc:date>2020-12-16T23:39:40Z</dc:date>
    </item>
  </channel>
</rss>

