[gdal-dev] python filegdb problems

Ari Jolma ari.jolma at gmail.com
Tue Mar 20 15:07:30 EDT 2012


Kevin,

Could you post the test database somewhere?

Ari

On 03/20/2012 08:57 PM, Netherton, Kevin J FLNR:EX wrote:
> 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
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120320/274a8d78/attachment.html


More information about the gdal-dev mailing list