Re: [gdal-dev] Bigtiff question

Lucena, Ivan ivan.lucena at pmldnet.com
Thu Mar 5 14:45:49 EST 2009


Even,

>  for the very poor performance when dealing with pixel interleaved GTiffs with
>  a large number of bands, I think you've hit ticket #2838 that has been fixed
>  3 weeks ago in trunk and branches/1.6 (*). The performance issue was about
>  *reading* in such files, but sometimes when you write and the block cache
>  size is not big enough, you also end up reading back partially written
>  scanlines. Hopefully this would correct the problem you observe.

Ah!

>  But as Frank suggested, I would not recommand using pixel interleaved GTiffs
>  with a large number of bands anyway. This is fine for RGB or RGBA datasets,
>  but for more bands, it could cause cache trashing problems as we prefill the
>  blocks for all bands in pixel-interleaved mode (#2838 was about the fact this
>  technic wasn't correctly implemented)

What raster format would you suggest then?

I mean, based on those requirements:

- Multiband;
- Large files;
- Good performance *reading* the data in pixel space. Not the "band as usual" ;)

>  #!/usr/bin/python
>  import gdal
>  
>  driver_tif = gdal.GetDriverByName("GTIFF")
>  output_dst = driver_tif.Create( 'test.tif', 20, 20, 320, gdal.GDT_Byte,
>  [ 'TILED=NO', 'INTERLEAVE=PIXEL' ])
>  for i in range(320):
>      output_band = output_dst.GetRasterBand( i + 1 )
>      output_band.Fill(i + 1)
>      output_band.FlushCache()
>  output_dst = None

My real data is 5000x2500x312 Int16, can you try with:

--
  output_dst = driver_tif.Create( 'test.tif', 5000, 2500, 312, gdal.GDT_Int16,
      [ 'TILED=NO', 'INTERLEAVE=PIXEL' ])
--

My best regards,

Ivan



More information about the gdal-dev mailing list