[gdal-dev] Re: [GDAL_TRANSLATE] Gray scale

Daniele Romagnoli daniele.romagnoli at geo-solutions.it
Thu Jun 30 10:19:37 EDT 2011


Hi,
I'm not sure about which type of logic is applied by ENVI when saving to
ENVI 8-bit.
You could try with:
gdal_translate -of ENVI -ot Byte -scale gtiffimg.tif fromgdal.raw

and see the result. the "-scale" option will rescale the pixel values from
the UINT16 range 1 - 24806  to Byte 0 - 255.
In case it is still different, you could also try a "gdalinfo -stats" on
fromENVI and you could probably work on the -scale option to get the same
result.

Let us know.
Regards,
Daniele



On Thu, Jun 30, 2011 at 4:11 PM, Solimyr <giannicristian at msn.com> wrote:

> Driver: GTiff/GeoTIFF
> Files: File.tif
>       File.tfw
> Size is 1828, 1646
> Coordinate System is:
> PROJCS["WGS 84 / UTM zone 47S",
>    GEOGCS["WGS 84",
>        DATUM["WGS_1984",
>            SPHEROID["WGS 84",6378137,298.257223563,
>                AUTHORITY["EPSG","7030"]],
>            AUTHORITY["EPSG","6326"]],
>        PRIMEM["Greenwich",0],
>        UNIT["degree",0.0174532925199433],
>        AUTHORITY["EPSG","4326"]],
>    PROJECTION["Transverse_Mercator"],
>    PARAMETER["latitude_of_origin",0],
>    PARAMETER["central_meridian",99],
>    PARAMETER["scale_factor",0.9996],
>    PARAMETER["false_easting",500000],
>    PARAMETER["false_northing",10000000],
>    UNIT["metre",1,
>        AUTHORITY["EPSG","9001"]],
>    AUTHORITY["EPSG","32747"]]
> Origin = (650301.875000000000000,9895384.375000000000000)
> Pixel Size = (1.250000000000000,-1.250000000000000)
> Metadata:
>  TIFFTAG_XRESOLUTION=1
>  TIFFTAG_YRESOLUTION=1
>  AREA_OR_POINT=Area
> Image Structure Metadata:
>  INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left  (  650301.875, 9895384.375) (100d21' 2.82"E,  0d56'46.41"S)
> Lower Left  (  650301.875, 9893326.875) (100d21' 2.84"E,  0d57'53.40"S)
> Upper Right (  652586.875, 9895384.375) (100d22'16.73"E,  0d56'46.38"S)
> Lower Right (  652586.875, 9893326.875) (100d22'16.76"E,  0d57'53.37"S)
> Center      (  651444.375, 9894355.625) (100d21'39.79"E,  0d57'19.89"S)
> Band 1 Block=1828x1 Type=UInt16, ColorInterp=Gray
>  Minimum=1.000, Maximum=24806.000, Mean=230.385, StdDev=290.366
>  Metadata:
>    STATISTICS_MINIMUM=1
>    STATISTICS_MAXIMUM=24806
>    STATISTICS_MEAN=230.38520376963
>    STATISTICS_STDDEV=290.36594272901
>
>
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/GDAL-TRANSLATE-Gray-scale-tp6533237p6533400.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
>



-- 
-------------------------------------------------------
Ing. Daniele Romagnoli
GeoSolutions S.A.S.
Software Engineer

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://it.linkedin.com/in/danieleromagnoli


-------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110630/07095c53/attachment.html


More information about the gdal-dev mailing list