<?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 do I use a local server to access the feature tables in a local File Geodatabase so that I can query and instantiate Feature objects? in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-do-i-use-a-local-server-to-access-the-feature/m-p/329777#M1645</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;I'm trying to determine how to access a File Geodatabase using the C++ Qt Runtime API. According to the information on this page, &lt;A href="https://developers.arcgis.com/qt/latest/cpp/guide/supported-geodatabase-formats.htm"&gt;https://developers.arcgis.com/qt/latest/cpp/guide/supported-geodatabase-formats.htm&lt;/A&gt;, that should be possible if I use a local server.&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;What I need to be able to do is access the feature tables in the FGDB. If I can get to the point where I can instantiate an ArcGISFeatureTable class, then I know from there how to use queryFeatures() to get Feature objects, which is what I'm ultimately trying to do. I also am interested in editing those objects. The ArcGISFeatureTable class allow me to add, update, or delete features.&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;I know how to get the local server started. But, from that point, it's not clear from the documentation how actually to get the feature tables. I looked at the example called DynamicWorkspaceShapefile (&lt;A href="https://github.com/Esri/arcgis-runtime-samples-qt/tree/master/ArcGISRuntimeSDKQt_CppSamples/LocalServer/DynamicWorkspaceShapefile"&gt;https://github.com/Esri/arcgis-runtime-samples-qt/tree/master/ArcGISRuntimeSDKQt_CppSamples/LocalServer/DynamicWorkspaceShapefile&lt;/A&gt;) thinking that it would do something similar except with shp files. However, the example does not actually access the feature classes directly. It creates a map service and generates an image. I looked at the pattern of defining a FileGeodatabaseWorkspace (instead of a ShapefileWorkspace) and then a TableSubLayerSource, but it didn't seem to help me get to ArcGISFeatureTables.&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;An immediate issue is that this approach requires&amp;nbsp; a LocalFeatureService to be created which needs a map package (.mpk) file. In my case, I don't have a map and don't need a map. However, to try that approach I did get as far as using ArcMap to create a map package (.mpk) file from a map created from file gdb tables. I figured that from the local feature service, I could get a url that I could use for creating a ServiceFeatureTable.&amp;nbsp; Unfortunately, when I tried to load a local feature service defined from that mpk file, I got a load failed (not sure why yet, the errorOccurred signal wasn't triggered). Even if that had worked, it still would have been a round about way that accessed a packaged copy of the data and not a direct way to access the original fgdb.&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;So, my question is how do I use the local server to access the feature tables in a local fgdb so that I can instantiate Feature objects?&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Feb 2019 16:25:00 GMT</pubDate>
    <dc:creator>OrestHalustchak</dc:creator>
    <dc:date>2019-02-01T16:25:00Z</dc:date>
    <item>
      <title>How do I use a local server to access the feature tables in a local File Geodatabase so that I can query and instantiate Feature objects?</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-do-i-use-a-local-server-to-access-the-feature/m-p/329777#M1645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;I'm trying to determine how to access a File Geodatabase using the C++ Qt Runtime API. According to the information on this page, &lt;A href="https://developers.arcgis.com/qt/latest/cpp/guide/supported-geodatabase-formats.htm"&gt;https://developers.arcgis.com/qt/latest/cpp/guide/supported-geodatabase-formats.htm&lt;/A&gt;, that should be possible if I use a local server.&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;What I need to be able to do is access the feature tables in the FGDB. If I can get to the point where I can instantiate an ArcGISFeatureTable class, then I know from there how to use queryFeatures() to get Feature objects, which is what I'm ultimately trying to do. I also am interested in editing those objects. The ArcGISFeatureTable class allow me to add, update, or delete features.&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;I know how to get the local server started. But, from that point, it's not clear from the documentation how actually to get the feature tables. I looked at the example called DynamicWorkspaceShapefile (&lt;A href="https://github.com/Esri/arcgis-runtime-samples-qt/tree/master/ArcGISRuntimeSDKQt_CppSamples/LocalServer/DynamicWorkspaceShapefile"&gt;https://github.com/Esri/arcgis-runtime-samples-qt/tree/master/ArcGISRuntimeSDKQt_CppSamples/LocalServer/DynamicWorkspaceShapefile&lt;/A&gt;) thinking that it would do something similar except with shp files. However, the example does not actually access the feature classes directly. It creates a map service and generates an image. I looked at the pattern of defining a FileGeodatabaseWorkspace (instead of a ShapefileWorkspace) and then a TableSubLayerSource, but it didn't seem to help me get to ArcGISFeatureTables.&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;An immediate issue is that this approach requires&amp;nbsp; a LocalFeatureService to be created which needs a map package (.mpk) file. In my case, I don't have a map and don't need a map. However, to try that approach I did get as far as using ArcMap to create a map package (.mpk) file from a map created from file gdb tables. I figured that from the local feature service, I could get a url that I could use for creating a ServiceFeatureTable.&amp;nbsp; Unfortunately, when I tried to load a local feature service defined from that mpk file, I got a load failed (not sure why yet, the errorOccurred signal wasn't triggered). Even if that had worked, it still would have been a round about way that accessed a packaged copy of the data and not a direct way to access the original fgdb.&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;So, my question is how do I use the local server to access the feature tables in a local fgdb so that I can instantiate Feature objects?&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2019 16:25:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/how-do-i-use-a-local-server-to-access-the-feature/m-p/329777#M1645</guid>
      <dc:creator>OrestHalustchak</dc:creator>
      <dc:date>2019-02-01T16:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a local server to access the feature tables in a local File Geodatabase so that I can query and instantiate Feature objects?</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-do-i-use-a-local-server-to-access-the-feature/m-p/329778#M1646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The general workflow in the shapefile dynamic workspace sample should be what you follow for the file geodatabase -&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-runtime-samples-qt/blob/master/ArcGISRuntimeSDKQt_CppSamples/LocalServer/DynamicWorkspaceShapefile/DynamicWorkspaceShapefile.cpp" title="https://github.com/Esri/arcgis-runtime-samples-qt/blob/master/ArcGISRuntimeSDKQt_CppSamples/LocalServer/DynamicWorkspaceShapefile/DynamicWorkspaceShapefile.cpp"&gt;arcgis-runtime-samples-qt/DynamicWorkspaceShapefile.cpp at master · Esri/arcgis-runtime-samples-qt · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The general workflow is:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;create LocalMapService from blank MPK. You can use the one provided in the sample (&lt;A class="link-titled" href="https://www.arcgis.com/home/item.html?id=ea619b4f0f8f4d108c5b87e90c1b5be0" title="https://www.arcgis.com/home/item.html?id=ea619b4f0f8f4d108c5b87e90c1b5be0"&gt;https://www.arcgis.com/home/item.html?id=ea619b4f0f8f4d108c5b87e90c1b5be0&lt;/A&gt;&amp;nbsp;). This doesn't mean you will need a map, it is just an intermediate step needed to start up a local map service.&lt;/LI&gt;&lt;LI&gt;Create a FileGeodatabaseWorkspace&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-filegeodatabaseworkspace.html" title="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-filegeodatabaseworkspace.html"&gt;FileGeodatabaseWorkspace Class | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Create TableSublayerSource&lt;/LI&gt;&lt;LI&gt;Set the dynamic workspace on the LocalMapService&lt;/LI&gt;&lt;LI&gt;Start the service&lt;/LI&gt;&lt;LI&gt;Once the service starts, you should see REST endpoints to&amp;nbsp;Map Services that are spun up&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Create a ServiceFeatureTable by pointing to these REST endpoint URLs&lt;/LI&gt;&lt;LI&gt;You can then query the ServiceFeatureTable&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2019 15:30:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/how-do-i-use-a-local-server-to-access-the-feature/m-p/329778#M1646</guid>
      <dc:creator>LucasDanzinger</dc:creator>
      <dc:date>2019-02-06T15:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a local server to access the feature tables in a local File Geodatabase so that I can query and instantiate Feature objects?</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-do-i-use-a-local-server-to-access-the-feature/m-p/329779#M1647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Lucas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I tried those steps, I got a map service started but only the simple point layer from the mpk seems to be there. I think I'm missing a step of what to do with the TableSubLayerSource that I created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code that I'm using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; char* path = "E:/WaterNetwork/UtilityNetworkEditingAndAnalysisA4W/MapsandGeodatabase/WaterUtilities.gdb";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pkgPath = QDir::homePath() + "/ArcGIS/Runtime/Data/mpk/mpk_blank.mpk";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileGeodatabaseWorkspace* fgdbWorkspace = new FileGeodatabaseWorkspace("fgdb_wkspc", path, this);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TableSublayerSource* source = new TableSublayerSource(fgdbWorkspace-&amp;gt;id(), path, this);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LocalMapService* localMapServ = new LocalMapService(pkgPath, this);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; QList&amp;lt;DynamicWorkspace*&amp;gt; dynamicWorkspaces;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dynamicWorkspaces.append(fgdbWorkspace);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; localMapServ-&amp;gt;setDynamicWorkspaces(dynamicWorkspaces);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; connect(localMapServ, &amp;amp;LocalMapService::statusChanged, this, [&amp;amp;]()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (localMapServ-&amp;gt;status() == LocalServerStatus::Started)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qDebug() &amp;lt;&amp;lt; "Local map service started, url =" &amp;lt;&amp;lt; localMapServ-&amp;gt;url();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Add code here to create a ServiceFeatureTable by pointing to these REST endpoint URLs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; emit localMapServLoadDone();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (localMapServ-&amp;gt;status() == LocalServerStatus::Failed)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qDebug() &amp;lt;&amp;lt; "Local map service failed";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; emit localMapServLoadDone();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; connect(localMapServ, &amp;amp;LocalMapService::errorOccurred, this, [&amp;amp;](Esri::ArcGISRuntime::Error error)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!error.isEmpty())&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qDebug() &amp;lt;&amp;lt; "Error on Local Map Service Start:" &amp;lt;&amp;lt; error.message();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; showArcGISErrorMsg(error);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; localMapServ-&amp;gt;start();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do I need to do at the point where I have the comment about create ServiceFeatureTable? It seems that somewhere I need to do more with the TableSubLayerSource object.&lt;/P&gt;&lt;P&gt;From the above code, the map service url is &lt;A class="jivelink1" href="http://127.0.0.1:50000/qpDB90/arcgis/rest/services/mpk_blank.mpk/MapServer" title="http://127.0.0.1:50000/qpDB90/arcgis/rest/services/mpk_blank.mpk/MapServer"&gt;http://127.0.0.1:50000/qpDB90/arcgis/rest/services/mpk_blank.mpk/MapServer&lt;/A&gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Orest.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2019 18:50:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/how-do-i-use-a-local-server-to-access-the-feature/m-p/329779#M1647</guid>
      <dc:creator>OrestHalustchak</dc:creator>
      <dc:date>2019-02-06T18:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a local server to access the feature tables in a local File Geodatabase so that I can query and instantiate Feature objects?</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-do-i-use-a-local-server-to-access-the-feature/m-p/329780#M1648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is where you would create an ArcGISMapImageLayer from the LocalMapService url, an ArcGISMapImageSublayer from the TableSublayerSource, and append ArcGISMapImageSublayer to ArcGISMapImageLayer::mapImageSublayers().&amp;nbsp; However, the TableSubLayerSource represents a single table or feature class, correct? If the file gdb contains multiple tables, how do you iterate through them??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2020 03:36:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/how-do-i-use-a-local-server-to-access-the-feature/m-p/329780#M1648</guid>
      <dc:creator>JessicaTalbot1</dc:creator>
      <dc:date>2020-06-19T03:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a local server to access the feature tables in a local File Geodatabase so that I can query and instantiate Feature objects?</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-do-i-use-a-local-server-to-access-the-feature/m-p/329781#M1649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;A TableSubLayerSource represents a single table or feature class, correct? If the file gdb contains multiple tables/feature classes, how do you interrogate the gdb to see what’s inside? Do you need to create a TableSubLayerSource for each feature class?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2020 07:24:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/how-do-i-use-a-local-server-to-access-the-feature/m-p/329781#M1649</guid>
      <dc:creator>JessicaTalbot1</dc:creator>
      <dc:date>2020-06-26T07:24:04Z</dc:date>
    </item>
  </channel>
</rss>

