[Gdal-dev] problems with OGDI controlled image base

Alan Stewart astewart at terragotech.com
Mon Dec 11 13:35:29 EST 2006


I seem to be having a sporadic problem with the OGDI bridge, but only 
when accessing CIB data AFAIK. I'm writing a program using the C++ API 
and the 2006-09-26 CVS snapshot.

I'm opening a dataset as "gltp:/rpf/<path>/rpf" and examining the 
dataset's metadata for subdatasets. The program is designed so that if 
only one OGDI Image is found it will proceed with processing it. The 
dataset is closed and that particular subdataset is opened. If the 
dataset is CIB frequently the image that is read appears completely 
black. It does have the correct dimensions, number of bands, and sample 
data type. Occasionally I get a correct image, but mostly this is what I 
get. My program can also accept the complete URL of a subdataset. In 
that case the CIB subdataset the image is read correctly. I've tested 
that the same string is being passed to GDALOpen() in both cases.

I'm not detecting any errors from GDAL at any time. The program seems to 
work fine in both cases if the dataset is CADRG. So it seems to me that 
this is an issue with the closing of a CIB dataset and then opening a 
subdataset of the previously open CIB dataset, or something like that.

Has anyone else seen any problems like this or have any other ideas as 
to what the problem could be? Should I be doing something more to ensure 
the driver/dataset is correctly closed and reopened? Have any changes 
been made since my CVS snapshot that might affect this issue?

The code for closing the dataset and opening one of its subdatasets (in 
std::string gdal):

delete pDataset;
pDataset = NULL;

pDataset = (GDALDataset*) GDALOpen(gdal.c_str(), GA_ReadOnly);


TIA,
Alan

-- 

Alan Stewart
Senior Software Architect
TerraGo Technologies, Inc.
astewart at TerraGoTech.com
678-391-9615

"TerraGo Technologies’ GeoPDF is proving to be the smart choice for key players in the intelligence community."
	- Amy Stankiewicz, Editor-in-Chief, Geospatial Solutions




More information about the Gdal-dev mailing list