<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"> </font></div>
<div>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.</div>
<div> </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. Below is a quick summary of my
code:</div>
<div> </div>
<div><font face="Courier New, monospace" size="2"> 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"> 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"> 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"> <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"> <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"> </font></div>
<div>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?</div>
<div> </div>
<div><font face="Calibri, sans-serif" size="2"> </font></div>
<div><font face="Calibri, sans-serif" size="2"> </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>