Ticket #2632 (closed enhancement: fixed)

Opened 5 years ago

Last modified 4 years ago

GeoTIFF writer needs sparse file option

Reported by: arb Owned by: warmerdam
Priority: high Milestone: 1.6.0
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords: gtiff libtiff
Cc:

Description

The GeoTIFF writer can support the writing of sparse files (i.e. it doesn't write the blocks which contain no data). This is great except that the resulting files are not widely accepted by other TIFF readers. Suggestions:

1) add an option to turn on/off the writing of sparse files (probably implemented by pushing out zeroed blocks for all missing blocks when a file is closed if sparseness not desired)

2) consider making non-sparse files the default

Change History

Changed 5 years ago by warmerdam

  • keywords gtiff libtiff added
  • status changed from new to assigned
  • version changed from unspecified to svn-trunk
  • component changed from default to GDAL_Raster
  • milestone set to 1.6.0

Changed 5 years ago by warmerdam

  • priority changed from normal to high

Changed 4 years ago by warmerdam

  • status changed from assigned to closed
  • resolution set to fixed

A SPARSE_OK creation option has been added, defaulted to FALSE. If FALSE at the point the file is closed, all "zero offset" blocks will be written out with zero data. This change made only in trunk (r15789). Also updated the tiff_write.py script to use this option for the one really big bigtiff file created (r15790).

Changed 4 years ago by rouault

In r15791, I've added a SetDirectory?() call in FillEmptyTiles?() to avoid a crash when running tiff_write_54.

In r15792, I've moved the call to FillEmptyTiles?() after the call to FlushCache?() to avoid rewriting cached blocks after having written them as null blocks. That's usefull in case of compressed GTiff to keep them smaller.

Changed 4 years ago by warmerdam

Thank you Even.

Note: See TracTickets for help on using tickets.