John,<br><br>The &#39;unscale&#39; operation computes the real value of that pixel.<br><br>-90.8230819702148 is the value stored at the pixel.<br>-200.277178508775 is the value of the pixel.<br><br><div class="gmail_quote">
On Tue, Jul 26, 2011 at 5:35 AM, jt2000 <span dir="ltr">&lt;<a href="mailto:thakkar@nexgenwireless.com">thakkar@nexgenwireless.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Frank,<br>
<br>
Does the unscale option work as advertised?<br>
<br>
I have a raster with offset and scale set.<br>
<br>
Driver: GTiff/GeoTIFF<br>
Files: raster.tif<br>
       raster.tif.aux.xml<br>
Size is 10295, 7735<br>
Coordinate System is:<br>
PROJCS[&quot;unnamed&quot;,<br>
    GEOGCS[&quot;unnamed&quot;,<br>
        DATUM[&quot;North_American_Datum_1983&quot;,<br>
            SPHEROID[&quot;GRS 80&quot;,6378137,298.257222101],<br>
            TOWGS84[0,0,0,-0,-0,-0,0]],<br>
        PRIMEM[&quot;Greenwich&quot;,0],<br>
        UNIT[&quot;degree&quot;,0.0174532925199433]],<br>
    PROJECTION[&quot;Transverse_Mercator&quot;],<br>
    PARAMETER[&quot;latitude_of_origin&quot;,0],<br>
    PARAMETER[&quot;central_meridian&quot;,-87],<br>
    PARAMETER[&quot;scale_factor&quot;,0.9996],<br>
    PARAMETER[&quot;false_easting&quot;,500000],<br>
    PARAMETER[&quot;false_northing&quot;,0],<br>
    UNIT[&quot;Meter&quot;,1]]<br>
Origin = (246885.000000000000000,4726455.000000000000000)<br>
Pixel Size = (30.000000000000000,-30.000000000000000)<br>
Image Structure Metadata:<br>
  INTERLEAVE=BAND<br>
Corner Coordinates:<br>
Upper Left  (  246885.000, 4726455.000) ( 90d 5&#39;15.87&quot;W, 42d38&#39;56.20&quot;N)<br>
Lower Left  (  246885.000, 4494405.000) ( 89d59&#39;22.95&quot;W, 40d33&#39;42.29&quot;N)<br>
Upper Right (  555735.000, 4726455.000) ( 86d19&#39;10.68&quot;W, 42d41&#39;18.81&quot;N)<br>
Lower Right (  555735.000, 4494405.000) ( 86d20&#39;28.58&quot;W, 40d35&#39;54.87&quot;N)<br>
Center      (  401310.000, 4610430.000) ( 88d11&#39; 5.93&quot;W, 41d38&#39;22.21&quot;N)<br>
Band 1 Block=10295x1 Type=Float32, ColorInterp=Gray<br>
*  NoData Value=0<br>
  Offset: -200,   Scale:0.00305185094759972*<br>
<br>
<br>
when I do a gdallocationinfo on it, i get the value of -90.82 as follows:<br>
<br>
gdallocationinfo -b 1  raster.tif 3000 3342<br>
Report:<br>
  Location: (3000P,3342L)<br>
  Band 1:<br>
    Value: -90.8230819702148<br>
    Descaled Value: -200.277178508775<br>
<br>
Applying unscale<br>
 gdal_translate -unscale -of GTiff ~/raster.tif raster2.tif<br>
<br>
 gdallocationinfo -b 1  raster2.tif 3000 3342<br>
Report:<br>
  Location: (3000P,3342L)<br>
  Band 1:<br>
    Value: -200.27717590332<br>
<br>
I would have expected -90.82 as the value.  Am I wrong?<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/gdal-translate-unscale-option-tp4237854p6620565.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/gdal-translate-unscale-option-tp4237854p6620565.html</a><br>

Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br><br>+91-9494447584<br>17.2416N 80.1426E<br>