Changes between Version 13 and Version 14 of UserDocs/GdalWarp
- Timestamp:
- Dec 26, 2014, 3:35:14 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UserDocs/GdalWarp
v13 v14 24 24 }}} 25 25 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 26 If 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. 28 27 29 28 == Will increasing RAM increase the speed of gdalwarp? == … … 122 121 ''When I compress an image with gdalwarp the result is often many times larger than the original! '' 123 122 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. 123 By default gdalwarp operates on chunks that are not necessarily aligned with the boundaries of the 124 blocks/tiles/strips of the output format, so this might cause repeated compression/decompression of 125 partial blocks, leading to lost space in the output format. 125 126 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: 127 The situation can be improved by using the [http://gdal.org/structGDALWarpOptions.html#0ed77f9917bb96c7a9aabd73d4d06e08 OPTIMIZE_SIZE warping option], 128 but not that depending on the source and target projections, it might also significantly slow down 129 the warping process. 130 131 Another possibility is to use gdalwarp without compression and then follow up with gdal_translate with compression: 127 132 {{{ 128 133 gdalwarp infile tempfile.tif ...options... 129 134 gdal_translate tempfile.tif outfile.tif -co compress=lzw ...etc. 130 135 }}} 131 132 See ticket:1688 and linked discussions for a fuller explanation.133 136 134 137 Alternatively, 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.