Changes between Version 2 and Version 3 of UserDocs/GdalWarp


Ignore:
Timestamp:
Dec 6, 2007, 1:45:27 PM (16 years ago)
Author:
maphew
Comment:

added example for setting nodata flag in multiple images

Legend:

Unmodified
Added
Removed
Modified
  • UserDocs/GdalWarp

    v2 v3  
    66[[PageOutline(2-6,,inline)]]
    77
    8 === Will increasing RAM increase the speed of gdalwarp? ===
     8== What if '''nodata''' is different in each image? ==
     9
     10If the ''nodata'' tag is set in the geotiff header, gdalwarp will use it automatically, you don't need to do anything. However, `-srcnodata` overrides this, so if you are handling a bunch of images with different values to be ignored you need to either a) pre-process them to have the same to-be-ignored value, or b) set the nodata flag for each file. Use (b) if you need to preserve the original values for some reason, for example:
     11
     12{{{
     13# for this image we want to ignore black (0)
     14gdalwarp -srcnodata 0 -dstnodata 0 orig-ignore-black.tif black-nodata.tif
     15
     16# and now we want to ignore white (0)
     17gdalwarp -srcnodata 255 -dstnodata 255 orig-ignore-white.tif white-nodata.tif
     18
     19# and finally ignore a particular blue-grey (RGB 125 125 150)
     20gdalwarp -srcnodata "125 125 150" -dstnodata "125 125 150" orig-ignore-grey.tif grey-nodata.tif
     21
     22# now we can mosaic them all and not worry about nodata parameters
     23gdalwarp black-nodata.tif grey-nodata.tif white-nodata.tif final-mosaic.tif
     24}}}
     25 
     26
     27
     28== Will increasing RAM increase the speed of gdalwarp? ==
    929
    1030Adding ram will almost certainly increase the speed.  That’s not at all the same as saying that it is worth it, or that the speed increase will be significant. Disks are the slowest part of the process.
     
    2040
    2141
    22 ==== Warp and Cache Memory: Technical Details ====
     42=== Warp and Cache Memory: Technical Details ===
    2343
    2444The GDAL_CACHEMAX affects the amount of space reserved for the low