[gdal-dev] gdalwarp creates a bloated file

Craig Leat craig.leat at gmail.com
Fri Dec 21 02:09:45 EST 2007


Hi

I have a series of georeferenced Tiff images and I need to warp these
to a north-up orientation. The images are scans of some old sepia
plans. The files created by gdalwarp are in the order of 200 times
larger than the original files. Is there anything I can do to limit
the file size? Maybe limit the colour table to black and white only?

As an example, sheet10.tif has a file size of 1.1MB and gdalinfo
sheet10.tif gives the following:

Driver: GTiff/GeoTIFF
Size is 13628, 16432
Coordinate System is `'
GeoTransform =
  -64219.00281495275, 0.003048759934388564, 0.1562700173535697
  -3272519.112796375, 0.159032862204353, -0.001581954194990039
Metadata:
  TIFFTAG_IMAGEDESCRIPTION=
  TIFFTAG_XRESOLUTION=400
  TIFFTAG_YRESOLUTION=400
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Image Structure Metadata:
  COMPRESSION=CCITTFAX4
Corner Coordinates:
Upper Left  (  -64219.003,-3272519.113)
Lower Left  (  -61651.174,-3272545.107)
Upper Right (  -64177.454,-3270351.813)
Lower Right (  -61609.625,-3270377.808)
Center      (  -62914.314,-3271448.460)
Band 1 Block=13628x512 Type=Byte, ColorInterp=Palette
  Metadata:
    NBITS=1
  Color Table (RGB with 2 entries)
    0: 255,255,255,255
    1: 0,0,0,255

The file created by gdalwarp has a file size of 218.5MB and gdalinfo
on the file gives:

Driver: GTiff/GeoTIFF
Size is 16503, 13871
Coordinate System is `'
Origin = (-64219.002814952749759,-3270351.812950253952295)
Pixel Size = (0.158118831745193,-0.158118831745193)
Corner Coordinates:
Upper Left  (  -64219.003,-3270351.813)
Lower Left  (  -64219.003,-3272545.079)
Upper Right (  -61609.568,-3270351.813)
Lower Right (  -61609.568,-3272545.079)
Center      (  -62914.285,-3271448.446)
Band 1 Block=16503x1 Type=Byte, ColorInterp=Palette
  Color Table (RGB with 256 entries)
    0: 255,255,255,255
    1: 0,0,0,255
    2: 0,0,0,255
    3: 0,0,0,255
    :   :   :   :   :
255: 0,0,0,255

Any pointers are most welcome.

Craig


More information about the gdal-dev mailing list