<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Kevin,<br>
    <br>
    Could you post the test database somewhere?<br>
    <br>
    Ari<br>
    <br>
    On 03/20/2012 08:57 PM, Netherton, Kevin J FLNR:EX wrote:
    <blockquote
      cite="mid:04D57967A59C6E46B5A89DBF4BCFD30F6ABC2138@e7mbx32.idir.bcgov"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Exchange Server">
      <!-- converted from rtf -->
      <style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
      <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 color="#808080" face="Courier New, monospace"
            size="2">&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>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></pre>
    </blockquote>
    <br>
  </body>
</html>