<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri, sans-serif" size="2">
<div>Hello</div>
<div><font face="Calibri, sans-serif" size="2">&nbsp;</font></div>
<div>I&#8217;m trying to get the python bindings to the ogr library working with esri file geodatabase (filegdb) support.&nbsp; I am using the latest version of ms4w package that includes gdal/ogr 1.9.</div>
<div>&nbsp;</div>
<div>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.&nbsp; Below is a quick summary of my code:</div>
<div>&nbsp;</div>
<div><font face="Courier New, monospace" size="2">&nbsp;&nbsp;&nbsp; drvrObj = osgeo.ogr.GetDriverByName(r<font color="#00AA00"><i>'FileGDB'</i></font>) <font color="#808080"># print the driver </font><font color="#808080"><u>retunrs</u></font><font color="#808080"> a SWIG
object</font></font></div>
<div><font face="Courier New, monospace" size="2">&nbsp;&nbsp;&nbsp; path = str(r<font color="#00AA00"><i>'C:\</i></font><font color="#00AA00"><u><i>testdatadir</i></u></font><font color="#00AA00"><i>\arc10geodb.gdb'</i></font>)</font></div>
<div><font face="Courier New, monospace" size="2">&nbsp;&nbsp;&nbsp; mydataSrc = drvrObj.Open(path) <font color="#808080"># printing the data source prints a SWIG object</font></font></div>
<div><font face="Courier New, monospace" size="2">&nbsp;&nbsp;&nbsp; <u>lyrCnt</u> = mydataSrc.GetLayerCount() <font color="#808080"># always returns 0 but there are many layers in the </font><font color="#808080"><u>fgdb</u></font></font></div>
<div><font face="Courier New, monospace" size="2">&nbsp;&nbsp;&nbsp; <u>lyr</u> = mydataSrc.GetLayer(<font color="#800000">0</font>) <font color="#808080"># always returns null</font></font></div>
<div><font face="Courier New, monospace" size="2" color="#808080">&nbsp;</font></div>
<div>The comments in the code above kind of summarize the situation.&nbsp; It appears that I can create a valid datasource but am unable to read the layers inside the datasource.&nbsp; Any ideas?</div>
<div>&nbsp;</div>
<div><font face="Calibri, sans-serif" size="2">&nbsp;</font></div>
<div><font face="Calibri, sans-serif" size="2">&nbsp;</font></div>
</font>
</body>
</html>