[Gdal-dev] CPG Format

Meek, Allan Allan.Meek at drdc-rddc.gc.ca
Mon Jan 29 15:19:16 EST 2007


I'm working with the Convair PolGASP driver (frmts/raw/cpgdataset.cpp),
as well as a custom driver I've written for a format similar to CPG.

As I understand it, the CPG driver cannot open image files larger than 2
GB. I'm trying to extend the driver to support larger files. I made the
following changes in the AdjustFilename function:

Line 252
VSIStatBuf sStatBuf; becomes 
VSIStatBufL sStatBuf;

Line 291
return VSIStat( ... ) == 0; becomes
return VSIStatL( ... ) == 0;

This change allows me to read larger files in Linux with gdalinfo.
However, when I try to read larger files in Solaris, gdalinfo gives me a
segmentation fault (with no core dump). I am able to read smaller files
with this version of gdalinfo.

Is there a particular reason why VSIStatL is causing these crashes in
Solaris? Is there any way to increase the filesize limit for the CPG
driver that would work in both Linux and Solaris?

Allan Meek
MDA, on contract to DRDC Ottawa

More information about the Gdal-dev mailing list