I have a 800MB GeoTIFF file generated from (ASTER GDEM v2 tiffs) depicting relief to be used as part of a basemap for an application I am working on. I intend GeoServer to serve this raster but it's way too big for my disk-quota allocation. When converted to JPEG200 it's about 15MB but can't use it since I can't install GDAL support on the host machine .

My question is: how else can I get a file < 100MB supported by GeoServer whilst retaining the relief depiction of my original GeoTiff.

  • I assume you have turned on compression inside the geotiff? – Ian Turton May 21 '12 at 11:35
  • @iant I suppose so since: gdal_translate -of GTiff -co "TILED=YES" -co "COMPRESS=YES" dem.tif relief.tif : is giving me GTiff does not SUPPORT COMPRESSED creation option. – Erick May 21 '12 at 12:10
  • 1
    that should be COMPRESS=[JPEG/LZW/PACKBITS/DEFLATE/CCITTRLE/CCITTFAX3/CCITTFAX4/NONE] see gdal.org/frmt_gtiff.html – Ian Turton May 21 '12 at 12:18
  • got half file size with COMPRESS=LZW Thanks. File still big though, will search somemore for workaround. – Erick May 21 '12 at 13:54
  • try compress=JPG and turn the quality down – Ian Turton May 21 '12 at 13:58

Your data is a DEM, using JPEG compression will ruin it and might not work at all (JPEG works on one band, 8bit data, but your data might be float or int 16 bit.

If LZW does not give you enough compression another option is to accept a loss in data resolution and ask gdal_translate to reduce the raster resolution using, for example, -outsize 50% 50%.

Or you might find you don't actually need the whole raster, but only a portion of it, and use gdal_translate to extract only the relevant portion of it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.