[gdal-dev] VMAP Issues.
Courtney Schitka
c.schitka at gmail.com
Wed Apr 30 10:39:38 EDT 2008
Hi All,
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.
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
when I ask the layer to get the Extents I try to execute this loop
in ogrlayer.cpp.
Method:
OGRErr OGRLayer::GetExtent(OGREnvelope *psExtent, int bForce )
while( (poFeature = GetNextFeature()) != NULL )
{
}
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.
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.
Plz help.
Courtney.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080430/77e1bdb4/attachment.html
More information about the gdal-dev
mailing list