Some problems about table definition XML

3718
3
06-14-2011 12:38 AM
SatoruGUNJI
Esri Contributor
I use Final release of FGDBAPI.


  1. The Geodatabase::CreateTable can't create featureclass using the XML that exported from GetDefinition. The error code is -2147467259 and the description is "General function failure".

  2. The XML that exported from GetDefinition does not contain WKT and WKID tags under SpatialReference tag. There isn't way to get a spatial reference information from FGDB except using ArcGIS.

  3. When a featureclass is created using XML with the minimum spatial reference definition, a spatial reference does not equal to the default values of ArcGIS Desktop.

FGDB API
SPRef     :GCS_JGD_2000
False X   :-400
False Y   :-90
XY Units  :1000000000
Resolution:1E-09
Tolerance :1E-08

ArcGIS Desktop
SPRef     :GCS_JGD_2000
False X   :-400
False Y   :-400
XY Units  :1111948722.22222
Resolution:8.99322046075566E-10
Tolerance :8.98315284119521E-09
0 Kudos
3 Replies
LanceShipman
Esri Regular Contributor
I use Final release of FGDBAPI.


  1. The Geodatabase::CreateTable can't create featureclass using the XML that exported from GetDefinition. The error code is -2147467259 and the description is "General function failure".

  2. The XML that exported from GetDefinition does not contain WKT and WKID tags under SpatialReference tag. There isn't way to get a spatial reference information from FGDB except using ArcGIS.

  3. When a featureclass is created using XML with the minimum spatial reference definition, a spatial reference does not equal to the default values of ArcGIS Desktop.



#1 & #2 Please send a copy of your feature class (lshipman@esri.com) and we will take a look. Both of these work for us.
#3 ArcGIS Desktop has access to functionality not present in the API so the default values will be different.

To get more error information when table creation fails add the extended error code from the following code fragment.

  if ((hr = geodatabase.CreateTable(featureClassDef,L"", streetsTable)) != S_OK)
  {
    wcout << "An error occurred while creating the table." << endl;
    ErrorInfo::GetErrorDescription(hr, errorText);
    wcout << errorText << "(" << hr << ")." << endl;

 // Report any extended errors (XML).
 ErrorInfo::GetErrorRecordCount(recordCount);
 for (int i = 0;i <= (recordCount - 1); i++)
 {
  ErrorInfo::GetErrorRecord(i,hr,errorText);
  wcout << errorText << endl;
 }
 ErrorInfo::ClearErrors();

    return -1; 
0 Kudos
SatoruGUNJI
Esri Contributor
I sent my sample project to you.

#3 ArcGIS Desktop has access to functionality not present in the API so the default values will be different.

I want that FGDB API set the same default values as ArcGIS.

If #2 and #3 is not implemented, FGDB API is difficult to use.
0 Kudos
LanceShipman
Esri Regular Contributor
#1 Represents a bug which we will fix in the next release. You can fix it by modifying the 10.0 in the second line of the XML to 10.1.
#2 Is the result of not including the \ in the table name.
0 Kudos