<?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: FileGDB_1.3_2010 C++ API: How to get GeometryDef and SpatialReference objects in File Geodatabase API Questions</title>
    <link>https://community.esri.com/t5/file-geodatabase-api-questions/filegdb-1-3-2010-c-api-how-to-get-geometrydef-and/m-p/415184#M692</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;These classes are for public use, but are not complete with the 1.3 release. It is not possible to create a table or feature class using these classes. We will not be dropping them from the API and hope to fill out the rest of the functionality in a future release. They will documented in the next release.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 May 2013 15:04:32 GMT</pubDate>
    <dc:creator>LanceShipman</dc:creator>
    <dc:date>2013-05-22T15:04:32Z</dc:date>
    <item>
      <title>FileGDB_1.3_2010 C++ API: How to get GeometryDef and SpatialReference objects</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/filegdb-1-3-2010-c-api-how-to-get-geometrydef-and/m-p/415181#M689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The C++ API FileGDB_1.3_2010 delivers a header file "Util.h" that contains utility classes for GeometryDef, SpatialReference etc.&amp;nbsp; But there are no examples that explains the usage of these utility classes.&amp;nbsp; We can very easily get the XML table definition, but it is very difficult and error prone to parse the XML file to get GeometryDef and SpatialReference information.&amp;nbsp; When API delivers these utility classes, I believe API should have given utility functions that populates these objects by parsing XML table definition.&amp;nbsp; This will make the life of developers easy and the code will be less error prone.&amp;nbsp; Let me know if such utility functions already exists or if somebody has coded, please share.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2013 05:42:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/filegdb-1-3-2010-c-api-how-to-get-geometrydef-and/m-p/415181#M689</guid>
      <dc:creator>ViksitAgarwal</dc:creator>
      <dc:date>2013-05-08T05:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: FileGDB_1.3_2010 C++ API: How to get GeometryDef and SpatialReference objects</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/filegdb-1-3-2010-c-api-how-to-get-geometrydef-and/m-p/415182#M690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;std::vector&amp;lt;wstring&amp;gt; feature_classes;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; hr = geodatabase.GetChildDatasets(L"\\", L"Feature Class", feature_classes));&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; for (i = 0; i &amp;lt; feature_classes.size(); i++)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; wstring this_table = feature_classes&lt;I&gt;;&lt;/I&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Table table;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; hr = geodatabase.OpenTable(this_table, table);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; // Get the field type and name from the row enumerator.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; FieldInfo fieldInfo;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; table.GetFieldInformation(fieldInfo);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldCount;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; FieldType fieldType;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; wstring wstrFieldName;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; wstring wstrLabelField;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; std::vector&amp;lt;FieldDef&amp;gt; fieldDefs;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; hr = table.GetFields( fieldDefs );&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; fieldInfo.GetFieldCount(fieldCount);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; for (long fieldNumber = 0; fieldNumber &amp;lt; fieldCount; fieldNumber++)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; fieldInfo.GetFieldType(fieldNumber, fieldType);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; fieldInfo.GetFieldName(fieldNumber, wstrFieldName);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; if (fieldTypeGeometry == fieldType)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FieldDef fieldDef = fieldDefs[fieldNumber];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GeometryDef geometryDef;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hr = fieldDef.GetGeometryDef( geometryDef );&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SpatialReference spatialReference;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hr = geometryDef.GetSpatialReference(spatialReference);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; wstring wstrSpatialReferenceText;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hr = spatialReference.GetSpatialReferenceText( wstrSpatialReferenceText );&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int wkid;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hr = spatialReference.GetSpatialReferenceID( wkid );&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 16:34:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/filegdb-1-3-2010-c-api-how-to-get-geometrydef-and/m-p/415182#M690</guid>
      <dc:creator>DanFoster</dc:creator>
      <dc:date>2013-05-21T16:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: FileGDB_1.3_2010 C++ API: How to get GeometryDef and SpatialReference objects</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/filegdb-1-3-2010-c-api-how-to-get-geometrydef-and/m-p/415183#M691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks a lot Dan for sharing the code that shows the usage of the classes defined in Utils.h.&amp;nbsp; Couple of follow-up questions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;Since these C++ classes are not documented in the doxygen help, are these classes private in nature?&amp;nbsp; Since in C++, all header files need to be supplied for compilation, there is no clear access specifier that tells whether a class is public or private. The only way I understand to distinguish is the documentation, public classes are documented and private ones are not documented to discourage their usage.&amp;nbsp; If we use these un-documented classes, are they prone to change in future, what is the intention behind not providing documentation of these classes?&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;The code snippet will work for reading the data, can you please share a similar code snippet for writing FGDB data like defining schema of a feature class or table?&amp;nbsp; Constructing XML for FGDB schema creation is cumbersome and error prone.&lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 12:49:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/filegdb-1-3-2010-c-api-how-to-get-geometrydef-and/m-p/415183#M691</guid>
      <dc:creator>ViksitAgarwal</dc:creator>
      <dc:date>2013-05-22T12:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: FileGDB_1.3_2010 C++ API: How to get GeometryDef and SpatialReference objects</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/filegdb-1-3-2010-c-api-how-to-get-geometrydef-and/m-p/415184#M692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;These classes are for public use, but are not complete with the 1.3 release. It is not possible to create a table or feature class using these classes. We will not be dropping them from the API and hope to fill out the rest of the functionality in a future release. They will documented in the next release.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 15:04:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/filegdb-1-3-2010-c-api-how-to-get-geometrydef-and/m-p/415184#M692</guid>
      <dc:creator>LanceShipman</dc:creator>
      <dc:date>2013-05-22T15:04:32Z</dc:date>
    </item>
  </channel>
</rss>

