[gdal-dev] TILED=NO creates a tiled TIFF?

Maciej Sieczka tutey at o2.pl
Sun Jun 22 18:24:29 EDT 2008


Frank Warmerdam pisze:
> Maciej Sieczka wrote:

>> I have a tiled GeoTIFF at input:
>> 
>> $ gdalinfo ~/check.tif | grep Block Band 1 Block=256x256 Type=Byte,
>> ColorInterp=Palette
>> 
>> I want to make it stripped, yet the output of:
>> 
>> $ gdal_translate -co "TILED=NO" check.tif check2.tif
>> 
>> seems still tiled:
>> 
>> $ gdalinfo ~/check2.tif | grep Block Band 1 Block=4090x2 Type=Byte,
>> ColorInterp=Palette
>> 
>> I expected "Block=WIDTHx1". Is there something wrong or my bad?

> The traditional TIFF logic is to create strips which are 8K or so.
> If you want each strip to be a single scanline, try also specifying 
> -co BLOCKYSIZE=1.

Frank,

Thanks for the hint. Unfortunatelly gdal_translate segfaults then:

Starting program: /usr/local/bin/gdal_translate -co "TILED=YES" -co
"BLOCKYSIZE=1" check.tif check3.tif
[Thread debugging using libthread_db enabled]
warning: Lowest section in /usr/lib/libicudata.so.38 is .hash at
0000000000000120
Input file size is 4090, 2216
0ERROR 1: _TIFFVSetField:check3.tif: Bad value 1 for "TileLength" tag
ERROR 1: TIFFReadDirectory:Cannot handle zero number of tiles
ERROR 1: TIFFReadDirectory:Cannot handle zero number of tiles
[New Thread 0x2b7d1400eb30 (LWP 12676)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2b7d1400eb30 (LWP 12676)]
GTiffCreateCopy (pszFilename=0x610f70 "check3.tif", poSrcDS=0x613340,
bStrict=<value optimized out>, papszOptions=0x610f90,
pfnProgress=0x401f20 <GDALTermProgress at plt>, pProgressData=0x0)
at geotiff.cpp:4609
4609 hTIFF = (TIFF*) poDS->GetInternalHandle(NULL);
(gdb) bt
#0 GTiffCreateCopy (pszFilename=0x610f70 "check3.tif", poSrcDS=0x613340,
bStrict=<value optimized out>, papszOptions=0x610f90,
pfnProgress=0x401f20 <GDALTermProgress at plt>, pProgressData=0x0)
at geotiff.cpp:4609
#1 0x00002b7d0d4819cc in GDALDriver::CreateCopy (this=0x606c40,
pszFilename=0x610f70 "check3.tif", poSrcDS=0x613340, bStrict=0,
papszOptions=0x610f90, pfnProgress=0x401f20 <GDALTermProgress at plt>,
pProgressData=0x0) at gdaldriver.cpp:529
#2 0x00000000004039bf in ProxyMain (argc=<value optimized out>,
argv=0x610f20)
at gdal_translate.cpp:590
#3 0x00002b7d118561c4 in __libc_start_main () from /lib/libc.so.6
#4 0x0000000000401f89 in _start ()

Using 1.5.2 r14751 on amd64 Debian testing.

Maciek

-- 
Maciej Sieczka
www.sieczka.org


More information about the gdal-dev mailing list