[Gdal-dev] RawRasterBand -- bIsVSIL

Frank Warmerdam warmerdam at pobox.com
Mon Feb 5 18:54:32 EST 2007


Meek, Allan wrote:
> Hi,
> 
> I'm working on a driver for a single-band raw image that needs large
> files support. When I set bIsVSIL in the line below to TRUE, compile
> GDAL, and run gdal_translate (or any of the other apps), I get a crash.
> The crash occurs regardless of the image size.
> 
> poDS->SetBand( 
>             1, new RawRasterBand( poDS, nBand, fpRaw,
>                                   nImgOffset, nPixelOffset, nLineOffset,
> 
>                                   eDataType, bNativeOrder, bIsVSIL ));
> 
> I traced the problem and found that the crash occurs at the first call
> to VSIFSeekL in RawRasterBand::Seek().
> 
> None of the other raw image formats that have bIsVSIL set to TRUE give
> me this trouble. I'm working in Red Hat Linux. Is there some switch I'm
> missing, some compile instruction I don't have?

Allan,

Are you using VSIFOpenL() to open the file handle that you pass to
RawRasterBand()?  If yes, the bIsVSIL TRUE is appropriate.  If instead
you are using VSIFOpen() then you should pass FALSE for bIsVSIL.

There is an RFC under development to obliterate this difference and
move everything to the large file API before GDAL 1.5.0 release.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list