[Gdal-dev] Maximum image size with PAux driver

Frank Warmerdam warmerdam at pobox.com
Tue Mar 23 10:31:18 EST 2004


Andrey Kiselev wrote:
> On Tue, Mar 23, 2004 at 12:49:41PM +0100, S?bastien Grignard wrote:
> 
>>I am assembling a couple of RGB Tiff images in one big PAux using the
>>gdal_merge.py utility, but the output image is incorrect. I suspect
>>this is due to its huge size : 133000x88000. I have already looked a
>>bit in the paux/raw driver code and changed the offset types to long
>>long without success...
> 
> 
> It should be fixed now in CVS. Please, test.

Andrey,

Could you move the logic for converting 64 bit integers to/from string
format down into CPL?  We don't want to have stuff like this in too many
places!


#if defined(WIN32) && defined(_MSC_VER)
         pszFormatString = "ChanDefinition-%d: %s %I64d %d %d %s\n";
# elif HAVE_LONG_LONG
         pszFormatString = "ChanDefinition-%d: %s %Ld %d %d %s\n";
#else
         pszFormatString = "ChanDefinition-%d: %s %ld %d %d %s\n";
#endif

#if defined(WIN32) && defined(_MSC_VER)
	nImgOffset = _atoi64( papszTokens[1] );
# elif HAVE_ATOLL
	nImgOffset = atoll( papszTokens[1] );
#else
	nImgOffset = atol( papszTokens[1] );
#endif

Perhaps a CPLAToBigI() and CPLBigIToA().

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    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list