#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 , 15 years ago
Component: | default → GDAL_Raster |
---|---|
Keywords: | gtiff libtiff added |
Milestone: | → 1.6.0 |
Status: | new → assigned |
Version: | unspecified → svn-trunk |
comment:2 by , 15 years ago
Priority: | normal → high |
---|
comment:3 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:4 by , 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.
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).