<?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: Load a feature layer form a GeoPackage in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/load-a-feature-layer-form-a-geopackage/m-p/1496928#M11736</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/3120"&gt;@nicogis&lt;/a&gt;&amp;nbsp;I get the error below when I attempt to open a table in snowflake. Do you know what would be a good solution for the error?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MK13_0-1719277566581.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/107837i21C71392F0E4BAF8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MK13_0-1719277566581.png" alt="MK13_0-1719277566581.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jun 2024 01:06:27 GMT</pubDate>
    <dc:creator>MK13</dc:creator>
    <dc:date>2024-06-25T01:06:27Z</dc:date>
    <item>
      <title>Load a feature layer form a GeoPackage</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/load-a-feature-layer-form-a-geopackage/m-p/1494428#M11696</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;is it possible to load a Feature Layer from a GeoPackage without adding it to the map ?&lt;/P&gt;&lt;P&gt;I'm using ArcGIS Pro SKD version 3.2 with Visual Studio 2022.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 15:17:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/load-a-feature-layer-form-a-geopackage/m-p/1494428#M11696</guid>
      <dc:creator>GloboGlobo</dc:creator>
      <dc:date>2024-06-18T15:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Load a feature layer form a GeoPackage</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/load-a-feature-layer-form-a-geopackage/m-p/1495556#M11714</link>
      <description>&lt;P&gt;In ArcGIS Pro 3.3 you can load&amp;nbsp; using similar code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;string path = "c:\Temp\dbgt.gpkg";
var datastore = new Database(new SQLiteConnectionPath(path))
var database = _datastore as Database;
IReadOnlyList&amp;lt;string&amp;gt; tableNames = database.GetTableNames();
foreach (string tableName in tableNames)
{
				QueryDescription queryDescription = database.GetQueryDescription(tableName);
				TableDefinition tableDefinition = database.GetDefinition(queryDescription);

				


    if (queryDescription.IsSpatialQuery())
				{
        FeatureClass b = (FeatureClass)database.OpenTable(queryDescription);
    }
				else 
				{
        Table a = database.OpenTable(queryDescription);
    }
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2024 18:20:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/load-a-feature-layer-form-a-geopackage/m-p/1495556#M11714</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2024-06-20T18:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Load a feature layer form a GeoPackage</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/load-a-feature-layer-form-a-geopackage/m-p/1496458#M11727</link>
      <description>&lt;P&gt;Thanks so much, that's what I was looking for&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 08:06:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/load-a-feature-layer-form-a-geopackage/m-p/1496458#M11727</guid>
      <dc:creator>GloboGlobo</dc:creator>
      <dc:date>2024-06-24T08:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Load a feature layer form a GeoPackage</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/load-a-feature-layer-form-a-geopackage/m-p/1496928#M11736</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/3120"&gt;@nicogis&lt;/a&gt;&amp;nbsp;I get the error below when I attempt to open a table in snowflake. Do you know what would be a good solution for the error?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MK13_0-1719277566581.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/107837i21C71392F0E4BAF8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MK13_0-1719277566581.png" alt="MK13_0-1719277566581.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 01:06:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/load-a-feature-layer-form-a-geopackage/m-p/1496928#M11736</guid>
      <dc:creator>MK13</dc:creator>
      <dc:date>2024-06-25T01:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Load a feature layer form a GeoPackage</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/load-a-feature-layer-form-a-geopackage/m-p/1497999#M11759</link>
      <description>&lt;P&gt;Sometimes there is other data that is in the geopackage file (for example raster data) that is not returned by the Database.GetTableNames method.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this instance you could use the the ItemFactory and Item classes to obtain the content.&amp;nbsp; &amp;nbsp;Here's an example snippet.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var otherUris = new List&amp;lt;Uri&amp;gt;();
var tableUris = new List&amp;lt;Uri&amp;gt;();

var item = ItemFactory.Instance.Create(gpkgPath, ItemFactory.ItemType.PathItem);
var children = item.GetItems();
foreach (var child in children)
{
   var childPath = child.Path;

   if (child.TypeID == "sqlite_table")
     tableUris.Add(new Uri(childPath));
   else
     otherUris.Add(new Uri(childPath));
}

// now use LayerFactory and StandloneTableFactory to 
//  create layers / tables&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 01:11:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/load-a-feature-layer-form-a-geopackage/m-p/1497999#M11759</guid>
      <dc:creator>NarelleChedzey</dc:creator>
      <dc:date>2024-06-27T01:11:28Z</dc:date>
    </item>
  </channel>
</rss>

