<div>Hi All, </div>
<div> </div>
<div>As you probably know. I am trying to read. Features from a VMAP data source via code I am developing using GDAL 1.5.1 with OGDI built in.</div>
<div> </div>
<div>I can get an OGRLayer* pLayer back when I ask the driver to open the data source, so I am assuming the driver is opening the file and the layer is a good layer since the pointer is Not null. HOWEVER </div>
<div>when I ask the layer to get the Extents I try to execute this loop in ogrlayer.cpp. </div>
<div> </div>
<div>Method: <font size="2">
<p>OGRErr OGRLayer::GetExtent(OGREnvelope *psExtent, </p></font><font color="#0000ff" size="2">int</font><font size="2"> bForce )</font></div>
<div><font size="2">
<p></p></font><font color="#0000ff" size="2">while</font><font size="2">( (poFeature = GetNextFeature()) != NULL )
<p>{</p>
<p>}</p>
<p>The call to GetNextFeature ALWAYS returns me a NULL ptr. Which is the SAME problem I am having in other areas of my code where I try to actually read the features. I would expect this to work because I as I said earlier the driver seems to open the data source and I can get a layer via the data source, the layer is good because I can get the layer Defn etc. This Method does return OGRErr 6. When I debug into GetNextFeature. OGDI seems to give me a Error 2 "End of Selection" - I thought this was because I was at an EOF or something. However even if I do a reset reading before trying to get the next feature. I still get the same problem. </p>
<p>This lead me to the assumption that the code was right and the data was bad. HOWVER when I open the data source + layer via ogrinfo. Everything works like a charm. </p>
<p>Plz help. </p>
<p>Courtney.</p></font></div>