Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2632 closed enhancement (fixed)

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 (5)

comment:1 by warmerdam, 15 years ago

Component: defaultGDAL_Raster
Keywords: gtiff libtiff added
Milestone: 1.6.0
Status: newassigned
Version: unspecifiedsvn-trunk

comment:2 by warmerdam, 15 years ago

Priority: normalhigh

comment:3 by warmerdam, 15 years ago

Resolution: fixed
Status: assignedclosed

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).

comment:4 by Even Rouault, 15 years ago

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.

comment:5 by warmerdam, 15 years ago

Thank you Even.

Note: See TracTickets for help on using tickets.