<?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: Extent missing in xml definition, but present in ArcMap in File Geodatabase API Questions</title>
    <link>https://community.esri.com/t5/file-geodatabase-api-questions/extent-missing-in-xml-definition-but-present-in/m-p/285139#M460</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The included Montgomery.gdb does not include a feature class named centroids. Are you using Final or Beta 3?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The following code exports the XML from the Blocks feature class. It does include the spatial reference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#include &amp;lt;string&amp;gt;
#include &amp;lt;iostream&amp;gt;
#include &amp;lt;fstream&amp;gt;

#include &amp;lt;FileGDBAPI.h&amp;gt;

using namespace std;
using namespace FileGDBAPI;

int main()
{
&amp;nbsp; // Open the geodatabase.
&amp;nbsp; fgdbError hr;
&amp;nbsp; wstring errorText;
&amp;nbsp; Geodatabase geodatabase;
&amp;nbsp; if ((hr = OpenGeodatabase(L"C:/FileGDB_API_Issues/Montgomery.gdb", geodatabase)) != S_OK)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout &amp;lt;&amp;lt; "An error occurred while opening the geodatabase." &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrorInfo::GetErrorDescription(hr, errorText);
&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout &amp;lt;&amp;lt; errorText &amp;lt;&amp;lt; "(" &amp;lt;&amp;lt; hr &amp;lt;&amp;lt; ")." &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;
&amp;nbsp; }

&amp;nbsp; Table table;
&amp;nbsp; if ((hr = geodatabase.OpenTable(L"\\Landbase\\Blocks", table)) != S_OK)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout &amp;lt;&amp;lt; "An error occurred while opening the table." &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrorInfo::GetErrorDescription(hr, errorText);
&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout &amp;lt;&amp;lt; errorText &amp;lt;&amp;lt; "(" &amp;lt;&amp;lt; hr &amp;lt;&amp;lt; ")." &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;
&amp;nbsp; }

&amp;nbsp; string tableDef;
&amp;nbsp; if ((hr = table.GetDefinition(tableDef)) != S_OK)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout &amp;lt;&amp;lt; "An error occurred while opening the table." &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrorInfo::GetErrorDescription(hr, errorText);
&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout &amp;lt;&amp;lt; errorText &amp;lt;&amp;lt; "(" &amp;lt;&amp;lt; hr &amp;lt;&amp;lt; ")." &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;
&amp;nbsp; }

&amp;nbsp; ofstream myfile;
&amp;nbsp; myfile.open("../Blocks.xml", ios::out);
&amp;nbsp; myfile &amp;lt;&amp;lt; tableDef;
&amp;nbsp; tableDef.clear();
&amp;nbsp; myfile.close();


&amp;nbsp; // Close the table
&amp;nbsp; if ((hr = geodatabase.CloseTable(table)) != S_OK)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout &amp;lt;&amp;lt; "An error occurred while closing Cities." &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrorInfo::GetErrorDescription(hr, errorText);
&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout &amp;lt;&amp;lt; errorText &amp;lt;&amp;lt; "(" &amp;lt;&amp;lt; hr &amp;lt;&amp;lt; ")." &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;
&amp;nbsp; }

&amp;nbsp; // Close the geodatabase
&amp;nbsp; if ((hr = CloseGeodatabase(geodatabase)) != S_OK)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout &amp;lt;&amp;lt; "An error occurred while closing the geodatabase." &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrorInfo::GetErrorDescription(hr, errorText);
&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout &amp;lt;&amp;lt; errorText &amp;lt;&amp;lt; "(" &amp;lt;&amp;lt; hr &amp;lt;&amp;lt; ")." &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;
&amp;nbsp; }

&amp;nbsp; return 0;
}
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 13:47:36 GMT</pubDate>
    <dc:creator>LanceShipman</dc:creator>
    <dc:date>2021-12-11T13:47:36Z</dc:date>
    <item>
      <title>Extent missing in xml definition, but present in ArcMap</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/extent-missing-in-xml-definition-but-present-in/m-p/285138#M459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have this dataset, whose feature class (centroids) has a UTM projection, but the projection is not included in the xml definition itself. In this case, how do I go about extracting projection from the feature class? Is there such thing as default? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Attached is the dataset I've been looking at.. Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2011 15:33:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/extent-missing-in-xml-definition-but-present-in/m-p/285138#M459</guid>
      <dc:creator>eykim</dc:creator>
      <dc:date>2011-06-13T15:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Extent missing in xml definition, but present in ArcMap</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/extent-missing-in-xml-definition-but-present-in/m-p/285139#M460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The included Montgomery.gdb does not include a feature class named centroids. Are you using Final or Beta 3?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The following code exports the XML from the Blocks feature class. It does include the spatial reference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#include &amp;lt;string&amp;gt;
#include &amp;lt;iostream&amp;gt;
#include &amp;lt;fstream&amp;gt;

#include &amp;lt;FileGDBAPI.h&amp;gt;

using namespace std;
using namespace FileGDBAPI;

int main()
{
&amp;nbsp; // Open the geodatabase.
&amp;nbsp; fgdbError hr;
&amp;nbsp; wstring errorText;
&amp;nbsp; Geodatabase geodatabase;
&amp;nbsp; if ((hr = OpenGeodatabase(L"C:/FileGDB_API_Issues/Montgomery.gdb", geodatabase)) != S_OK)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout &amp;lt;&amp;lt; "An error occurred while opening the geodatabase." &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrorInfo::GetErrorDescription(hr, errorText);
&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout &amp;lt;&amp;lt; errorText &amp;lt;&amp;lt; "(" &amp;lt;&amp;lt; hr &amp;lt;&amp;lt; ")." &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;
&amp;nbsp; }

&amp;nbsp; Table table;
&amp;nbsp; if ((hr = geodatabase.OpenTable(L"\\Landbase\\Blocks", table)) != S_OK)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout &amp;lt;&amp;lt; "An error occurred while opening the table." &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrorInfo::GetErrorDescription(hr, errorText);
&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout &amp;lt;&amp;lt; errorText &amp;lt;&amp;lt; "(" &amp;lt;&amp;lt; hr &amp;lt;&amp;lt; ")." &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;
&amp;nbsp; }

&amp;nbsp; string tableDef;
&amp;nbsp; if ((hr = table.GetDefinition(tableDef)) != S_OK)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout &amp;lt;&amp;lt; "An error occurred while opening the table." &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrorInfo::GetErrorDescription(hr, errorText);
&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout &amp;lt;&amp;lt; errorText &amp;lt;&amp;lt; "(" &amp;lt;&amp;lt; hr &amp;lt;&amp;lt; ")." &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;
&amp;nbsp; }

&amp;nbsp; ofstream myfile;
&amp;nbsp; myfile.open("../Blocks.xml", ios::out);
&amp;nbsp; myfile &amp;lt;&amp;lt; tableDef;
&amp;nbsp; tableDef.clear();
&amp;nbsp; myfile.close();


&amp;nbsp; // Close the table
&amp;nbsp; if ((hr = geodatabase.CloseTable(table)) != S_OK)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout &amp;lt;&amp;lt; "An error occurred while closing Cities." &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrorInfo::GetErrorDescription(hr, errorText);
&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout &amp;lt;&amp;lt; errorText &amp;lt;&amp;lt; "(" &amp;lt;&amp;lt; hr &amp;lt;&amp;lt; ")." &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;
&amp;nbsp; }

&amp;nbsp; // Close the geodatabase
&amp;nbsp; if ((hr = CloseGeodatabase(geodatabase)) != S_OK)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout &amp;lt;&amp;lt; "An error occurred while closing the geodatabase." &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrorInfo::GetErrorDescription(hr, errorText);
&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout &amp;lt;&amp;lt; errorText &amp;lt;&amp;lt; "(" &amp;lt;&amp;lt; hr &amp;lt;&amp;lt; ")." &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;
&amp;nbsp; }

&amp;nbsp; return 0;
}
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:47:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/extent-missing-in-xml-definition-but-present-in/m-p/285139#M460</guid>
      <dc:creator>LanceShipman</dc:creator>
      <dc:date>2021-12-11T13:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Extent missing in xml definition, but present in ArcMap</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/extent-missing-in-xml-definition-but-present-in/m-p/285140#M461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry. I attached a wrong file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With this attachment, I saw:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Landbase feature dataset&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Water feature dataset&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Centroids feature class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In ArcMap, you will see dataset # 1 and # 2 have the same projections and #3 has something else (WGS 84). I can't seem to find the spatial reference from the xml definition of #3. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And yes, I've updated file gdb library to final release 1. I'm looking forward to seeing more features in the next releases. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for help...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2011 12:57:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/extent-missing-in-xml-definition-but-present-in/m-p/285140#M461</guid>
      <dc:creator>eykim</dc:creator>
      <dc:date>2011-06-15T12:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Extent missing in xml definition, but present in ArcMap</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/extent-missing-in-xml-definition-but-present-in/m-p/285141#M462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How was the Centroids feature class created? The spatial reference is missing from its description. ArcGIS is getting the information from an alternate location. It should be in both locations.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2011 16:20:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/extent-missing-in-xml-definition-but-present-in/m-p/285141#M462</guid>
      <dc:creator>LanceShipman</dc:creator>
      <dc:date>2011-06-15T16:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Extent missing in xml definition, but present in ArcMap</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/extent-missing-in-xml-definition-but-present-in/m-p/285142#M463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;On EDN portal I downloaded something called ArcGIS_Desktop10_Tutorial_121093.iso and in there was a folder called BuildingAGeodatabase.&amp;nbsp; I assume you have access to the portal.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have another question for you. One of the feature class in that dataset is of Annotation feature class. Will the geometry type of annotation feature class always be polygons? Can they be multipoints?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Layer name: Distribution mains diameters&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Data Type: File Geodatabase Feature Class &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Location: C:\output\bugzilla\847\Montgomery_ref.gdb&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Feature Dataset: Water&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Feature Class: DistDiam&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Feature Type: Annotation&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Geometry Type: Polygon&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2011 15:37:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/extent-missing-in-xml-definition-but-present-in/m-p/285142#M463</guid>
      <dc:creator>eykim</dc:creator>
      <dc:date>2011-06-17T15:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: Extent missing in xml definition, but present in ArcMap</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/extent-missing-in-xml-definition-but-present-in/m-p/285143#M464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The Montgomery.gdb included in the Tutorial does not include a feature class named centroids. In any case the spatial reference information is stored in two locations. The data in both locations should be the same, but centroids case, it's not. This should never happen, so I'm trying to get an idea of what workflow created it. We are modifying the API to look in both locations when we output a feature class or feature dataset description.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The annotation feature class geometry type is always polygon. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please note that annotation is not supported by the API. You can read the table, but insert or update is blocked.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2011 17:35:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/extent-missing-in-xml-definition-but-present-in/m-p/285143#M464</guid>
      <dc:creator>LanceShipman</dc:creator>
      <dc:date>2011-06-17T17:35:46Z</dc:date>
    </item>
  </channel>
</rss>

