Thank you all !<br><br><div class="gmail_quote">2012/3/23 Frank Warmerdam <span dir="ltr"><<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Fri, Mar 23, 2012 at 10:29 AM, Chaitanya kumar CH<br>
<<a href="mailto:chaitanya.ch@gmail.com">chaitanya.ch@gmail.com</a>> wrote:<br>
> Output pixel value = (raw pixel value * scale) + offset<br>
<br>
</div>Exactly.<br>
<br>
The reason for scale and offset to exist is that "real world" measures<br>
like elevation, temperature, pressure are often represented in raster<br>
datasets as integer values rescaled from some original floating<br>
point values. This is done for compactness in raster format and<br>
because many raster formats don't support floating point pixels at<br>
all.<br>
<br>
So for instance, if you have a dataset with temperatures between<br>
-20 and 100 you might record them in byte values such with an<br>
offset -20 and scale 2.0 which would provide for half degree<br>
precision over the range in byte values.<br>
<br>
So a temperature of 80 would be represented as byte value<br>
of "50". The real temperature would be:<br>
<br>
50 * 2 - 20 = 80<br>
<br>
Best regards,<br>
<span class="HOEnZb"><font color="#888888">--<br>
---------------------------------------+--------------------------------------<br>
I set the clouds in motion - turn up | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a><br>
light and sound - activate the windows | <a href="http://pobox.com/%7Ewarmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>
and watch the world go round - Rush | Geospatial Software Developer<br>
</font></span></blockquote></div><br>