John,<br><br>The 'unscale' 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"><<a href="mailto:thakkar@nexgenwireless.com">thakkar@nexgenwireless.com</a>></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["unnamed",<br>
GEOGCS["unnamed",<br>
DATUM["North_American_Datum_1983",<br>
SPHEROID["GRS 80",6378137,298.257222101],<br>
TOWGS84[0,0,0,-0,-0,-0,0]],<br>
PRIMEM["Greenwich",0],<br>
UNIT["degree",0.0174532925199433]],<br>
PROJECTION["Transverse_Mercator"],<br>
PARAMETER["latitude_of_origin",0],<br>
PARAMETER["central_meridian",-87],<br>
PARAMETER["scale_factor",0.9996],<br>
PARAMETER["false_easting",500000],<br>
PARAMETER["false_northing",0],<br>
UNIT["Meter",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'15.87"W, 42d38'56.20"N)<br>
Lower Left ( 246885.000, 4494405.000) ( 89d59'22.95"W, 40d33'42.29"N)<br>
Upper Right ( 555735.000, 4726455.000) ( 86d19'10.68"W, 42d41'18.81"N)<br>
Lower Right ( 555735.000, 4494405.000) ( 86d20'28.58"W, 40d35'54.87"N)<br>
Center ( 401310.000, 4610430.000) ( 88d11' 5.93"W, 41d38'22.21"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>