Been playing around a bit more. Originally when I ran ogrinfo it did not list any of the layers in the filegdb. All the feature classes in the geodatabase came from SDE and have geometry columns named 'geometry'. When I copied a shapefile feature class into the file geodatabase and then ran ogrinfo all of a sudden that layer was listed. The feature class that is getting listed has a geometry column called 'shape'.
Is there a switch or a parameter that will allow ogrinfo to see the other feature classes in the file geodatabase? I suspect that its looking for a geometry column called 'shape' and isn't finding it. I copied the geodatabase to the following location in case that helps. ftp://ftp.geobc.gov.bc.ca/pub/outgoing/GeoBC_Regional/SIR/Kamloops/ogr/arc10gdb.zip -----Original Message----- From: Stefano Iacovella [mailto:[email protected]] Sent: Tuesday, March 20, 2012 2:04 PM To: Netherton, Kevin J FLNR:EX Cc: [email protected] Subject: Re: [gdal-dev] python filegdb problems Did you run ogrinfo arc10geodb.gdb on a shell? Does it show the layers inside the fileGDB or it throws some error? Stefano 2012/3/20 Netherton, Kevin J FLNR:EX <[email protected]>: > Hello > > I'm trying to get the python bindings to the ogr library working with esri > file geodatabase (filegdb) support. I am using the latest version of ms4w > package that includes gdal/ogr 1.9. > > I have created a esri file geodatabase driver, then from that created a data > source, but am unable to access layers from the data source object. Below > is a quick summary of my code: > > drvrObj = osgeo.ogr.GetDriverByName(r'FileGDB') # print the driver > retunrs a SWIG object > path = str(r'C:\testdatadir\arc10geodb.gdb') > mydataSrc = drvrObj.Open(path) # printing the data source prints a SWIG > object > lyrCnt = mydataSrc.GetLayerCount() # always returns 0 but there are many > layers in the fgdb > lyr = mydataSrc.GetLayer(0) # always returns null > > The comments in the code above kind of summarize the situation. It appears > that I can create a valid datasource but am unable to read the layers inside > the datasource. Any ideas? > > > > > _______________________________________________ > gdal-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/gdal-dev _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
