[gdal-dev] Re: gdal_translate -unscale option
Chaitanya kumar CH
chaitanya.ch at gmail.com
Tue Jul 26 01:46:46 EDT 2011
John,
The 'unscale' operation computes the real value of that pixel.
-90.8230819702148 is the value stored at the pixel.
-200.277178508775 is the value of the pixel.
On Tue, Jul 26, 2011 at 5:35 AM, jt2000 <thakkar at nexgenwireless.com> wrote:
> Frank,
>
> Does the unscale option work as advertised?
>
> I have a raster with offset and scale set.
>
> Driver: GTiff/GeoTIFF
> Files: raster.tif
> raster.tif.aux.xml
> Size is 10295, 7735
> Coordinate System is:
> PROJCS["unnamed",
> GEOGCS["unnamed",
> DATUM["North_American_Datum_1983",
> SPHEROID["GRS 80",6378137,298.257222101],
> TOWGS84[0,0,0,-0,-0,-0,0]],
> PRIMEM["Greenwich",0],
> UNIT["degree",0.0174532925199433]],
> PROJECTION["Transverse_Mercator"],
> PARAMETER["latitude_of_origin",0],
> PARAMETER["central_meridian",-87],
> PARAMETER["scale_factor",0.9996],
> PARAMETER["false_easting",500000],
> PARAMETER["false_northing",0],
> UNIT["Meter",1]]
> Origin = (246885.000000000000000,4726455.000000000000000)
> Pixel Size = (30.000000000000000,-30.000000000000000)
> Image Structure Metadata:
> INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left ( 246885.000, 4726455.000) ( 90d 5'15.87"W, 42d38'56.20"N)
> Lower Left ( 246885.000, 4494405.000) ( 89d59'22.95"W, 40d33'42.29"N)
> Upper Right ( 555735.000, 4726455.000) ( 86d19'10.68"W, 42d41'18.81"N)
> Lower Right ( 555735.000, 4494405.000) ( 86d20'28.58"W, 40d35'54.87"N)
> Center ( 401310.000, 4610430.000) ( 88d11' 5.93"W, 41d38'22.21"N)
> Band 1 Block=10295x1 Type=Float32, ColorInterp=Gray
> * NoData Value=0
> Offset: -200, Scale:0.00305185094759972*
>
>
> when I do a gdallocationinfo on it, i get the value of -90.82 as follows:
>
> gdallocationinfo -b 1 raster.tif 3000 3342
> Report:
> Location: (3000P,3342L)
> Band 1:
> Value: -90.8230819702148
> Descaled Value: -200.277178508775
>
> Applying unscale
> gdal_translate -unscale -of GTiff ~/raster.tif raster2.tif
>
> gdallocationinfo -b 1 raster2.tif 3000 3342
> Report:
> Location: (3000P,3342L)
> Band 1:
> Value: -200.27717590332
>
> I would have expected -90.82 as the value. Am I wrong?
>
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/gdal-translate-unscale-option-tp4237854p6620565.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
--
Best regards,
Chaitanya kumar CH.
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110726/cf3d7213/attachment-0001.html
More information about the gdal-dev
mailing list