[Gdal-dev] gdal_translate

Ayman Kamal kamal_jo at yahoo.com
Sat Mar 15 06:10:57 EST 2003


Below is the "gdalinfo" data for a geotiff file, I
used "gdal_translate" to convert this file to a bmp
file, the resulting file appeared as all white, when I
removed the -scale option the resulting bmp file
appeared correct.

Can you help me?
------------------------------------------------------
Driver: GTiff/GeoTIFF
Size is 375, 473
Coordinate System is:
PROJCS["unnamed",
    GEOGCS["NAD27",
        DATUM["North_American_Datum_1927",
            SPHEROID["Clarke
1866",6378206.4,294.9786982139006,
                AUTHORITY["EPSG","7008"]],
            AUTHORITY["EPSG","6267"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4267"]],
    AUTHORITY["EPSG","26715"],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-93],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["unknown",1]]
Origin = (716880.000000,4305960.000000)
Pixel Size = (30.000000,-30.000000)
Corner Coordinates:
Upper Left  (  716880.000, 4305960.000) (
90d29'59.67"W, 38d52'39.45"N)
Lower Left  (  716880.000, 4291770.000) (
90d30'15.74"W, 38d44'59.53"N)
Upper Right (  728130.000, 4305960.000) (
90d22'13.25"W, 38d52'29.20"N)
Lower Right (  728130.000, 4291770.000) (
90d22'30.16"W, 38d44'49.33"N)
Center      (  722505.000, 4298865.000) (
90d26'14.71"W, 38d48'44.44"N)
Band 1 Block=375x1 Type=Float32, ColorInterp=Gray
------------------------------------------------------
--- Frank Warmerdam <warmerdam at pobox.com> wrote:
> Ayman Kamal wrote:
> > ok sir, I found a way to make "gdal_translate" be
> able
> > to convert those 16-bit geotiff files:
> > 
> > gdal_translate -of bmp -ot byte file1.tif
> file2.bmp
> > 
> > (( simply I didn't put -scale in the command line
> ))
> > 
> > I just want one thing, do you have explanation for
> this?
> 
> Ayman,
> 
> Substantially different machinery is used with
> scaling is used from when it
> isn't.  However, I have rerun a test of converting a
> 16bit input file to
> 8bit BMP with scaling on my Linux system and it
> works fine even under
> valgrind, so I still don't know why your local build
> didn't work.  If you
> are still interested in the issue, the obvious step
> to take is for you to
> try and debug the problem since you are apparently
> the only one able to
> reproduce the problem.
> 
> Best regards,
> 
> -- 
>
---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank
> Warmerdam, warmerdam at pobox.com
> light and sound - activate the windows |
> http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial
> Programmer for Rent
> 
> 
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at remotesensing.org
> http://remotesensing.org/mailman/listinfo/gdal-dev


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com



More information about the Gdal-dev mailing list