Select to view content in your preferred language

File Geodatabase API 1.1 now available

3357
6
08-08-2011 03:01 PM
LanceShipman
Esri Regular Contributor
The File Geodatabase API 1.1 is now available. It includes a .NET wrapper for VS2010 and some bug fixes. Check out the geodatabase blog for details: http://blogs.esri.com/Dev/blogs/geodatabase/default.aspx
0 Kudos
6 Replies
StuartHarlan
Deactivated User
I created a file geodatabase with ArcCatalog 10.0 (Build 3200). I look at it in ArcCatalog and everything looks fine. I run the following C# code, it prints the first Feature Class to the console and then I get an error on OpenTable. Error is:

{"Invalid function arguments."}

Code is:

Geodatabase gdb = Geodatabase.Open("C:\\data10.gdb");
string [] fcs = gdb.GetChildDatasets("\\", "Feature Class");
foreach (string fc in fcs)
{
     Console.WriteLine(fc);
     Table t = gdb.OpenTable(fc);
}
gdb.Close();


EDIT: I have narrowed it down to feature classes imported into the FGDB through ArcCatalog -> Import -> Feature Class.  If I create a new, empty feature class in ArcCatalog, the error IS NOT thrown.  However, if I import the feature class from a shapefile or SDE, the error IS thrown.

EDIT: I believe it's the spatial reference. I'm importing the feature classes from Oracle SDE and shapfiles (that were exported from Oracle SDE). I've had spatial reference problems with Oracle before, specifically, the spatial reference that it thinks is WGS84 doesn't agree with ESRI's WGS84.
0 Kudos
LanceShipman
Esri Regular Contributor
Can you post a zipped copy of some data with this problem? I'd like to understand what this problem is. It may be a issue outside of just the API.
0 Kudos
MichaelChilds
Emerging Contributor
I'm having the same problem with OpenTable on a GDB from the California BLM. You can download it from http://www.globalmapper.com/Incoming/LandStatus2.gdb.zip . The table that I'm trying to open
the table '\LandStatus\LND_SurfaceEstate'. I get the "Invalid function argument" error trying to open that table with the v1.1 API.

Thanks,

Mike
0 Kudos
LanceShipman
Esri Regular Contributor
In your case, the data is using a custom projection. Custom projections are not supported by the File Geodatabase API. We are considering support for custom projections in a later release of the API.
0 Kudos
MichaelChilds
Emerging Contributor
Lance,

Thank you for the reply. Why does the API need to know the projection, seems that would be something the calling application would need to figure out, unless there is some reprojection or something happening in the API that I'm not aware of. All that I'm really concerned about is extracting the coordinates, I can ask the user for the projection if I can't automatically figure it out from the XML.

Thanks,

Mike
0 Kudos
HermannPeifer
New Contributor
In your case, the data is using a custom projection. Custom projections are not supported by the File Geodatabase API. We are considering support for custom projections in a later release of the API.


I am getting the same "Invalid function argument" error when trying to open layers with a "custom" CRS.  If "custom" projections are not yet supported by the API: it would *really* help if one could open the tables for reading the coordinates, even if the CRS information for the "custom" projection would have to fall back to "Unknown", "Custom", or something.
0 Kudos