[Gdal-dev] Scaling rasters

Jose Luis Gomez Dans josegomez at gmx.net
Wed Feb 7 06:11:03 EST 2007


Hi!
I have a raster with value between 1 and 100, and also 0s (these are NODATA). I want to set all the pixels with valid values (DN>=1) to a set value (let's call it Z), while leaving the rest at 0. I have tried gdal_translate -scale 1 100 Z Z, I get something which is half-way there: I get Z where Z should be, but (Z-1) where I should have 0. Apart from writing a little program that does this, can the gdal standard utility programs be used for this?

Thanks!
jose
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer



More information about the Gdal-dev mailing list