[gdal-dev] Range of band value changes when warping

Even Rouault even.rouault at mines-paris.org
Wed Jul 9 02:22:17 PDT 2014


Le mercredi 09 juillet 2014 10:49:34, bas smit a écrit :
> When the source image band having pixel values in the range of 52 and 207
> is warped using the following command:
> gdal_warp -t_srs wgs84 -r near in_file out_file
> 
> The resulted band has the pixel values in the range of 0 and 255 How can I
> make the range unchanged during warp?

During warping, you may have parts of the resulting image that do not match 
any source area, so 0 values are expected.
You can mark it as nodata by adding -dstnodata 0 to the command line.

I can't think how you get 255 values though.

Even

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the gdal-dev mailing list