Changes between Version 13 and Version 14 of UserDocs/GdalWarp


Ignore:
Timestamp:
Dec 26, 2014, 3:35:14 AM (9 years ago)
Author:
Even Rouault
Comment:

Some updates related to gdalwarp

Legend:

Unmodified
Added
Removed
Modified
  • UserDocs/GdalWarp

    v13 v14  
    2424}}}
    2525 
    26 If you are wondering why the `-dstnodata` is there, it's because although gdalwarp automatically honours  input nodata, it doesn't carry that through unless instructed.
    27 
     26If you are wondering why the `-dstnodata` is there, it's because although gdalwarp automatically honours input nodata, but before GDAL 1.11, it didn't carry that through unless instructed up.
    2827
    2928== Will increasing RAM increase the speed of gdalwarp? ==
     
    122121''When I compress an image with gdalwarp the result is often many times larger than the original! ''
    123122
    124 Note : with GDAL 1.7.2, the situation can be improved by using the [http://gdal.org/structGDALWarpOptions.html#0ed77f9917bb96c7a9aabd73d4d06e08 OPTIMIZE_SIZE warping option], so the following statements no really longer apply.
     123By default gdalwarp operates on chunks that are not necessarily aligned with the boundaries of the
     124blocks/tiles/strips of the output format, so this might cause repeated compression/decompression of
     125partial blocks, leading to lost space in the output format.
    125126
    126 The nature of gdalwarp and compression are fundamentally at odds with eath other, there is no fix forthcoming. The recommendation is to use gdalwarp without compression and then follow up with gdal_translate with compression:
     127The situation can be improved by using the [http://gdal.org/structGDALWarpOptions.html#0ed77f9917bb96c7a9aabd73d4d06e08 OPTIMIZE_SIZE warping option],
     128but not that depending on the source and target projections, it might also significantly slow down
     129the warping process.
     130
     131Another possibility is to use gdalwarp without compression and then follow up with gdal_translate with compression:
    127132{{{
    128133gdalwarp infile tempfile.tif ...options...
    129134gdal_translate tempfile.tif outfile.tif -co compress=lzw ...etc.
    130135}}}
    131 
    132 See ticket:1688 and linked discussions for a fuller explanation.
    133136
    134137Alternatively, you can use a VRT file as the output format of gdalwarp. The VRT file is just an XML file that will be created immediately. The gdal_translate operations will be of course a bit slower as it will do the real warping operation.