[Gdal-dev] Re: 16-bit PCIDSK files of elevation data

Frank Warmerdam warmerdam at pobox.com
Thu May 18 15:58:57 EDT 2006


Brent Fraser wrote:
> Frank,
> 
>   I'm trying to create a PCIDSK file of elevations from a .tif file using
> gdal_translate v1.3.2:
> 
> gdal_translate -ot UInt16 -of PCIDSK -a_srs EPSG:32638 gm.tif gm_UInt16.pix
> 
> Driver: GTiff/GeoTIFF
> Size is 4951, 4882
> Coordinate System is:
> PROJCS["WGS 84 / UTM zone 38N",
>     :
> Origin = (561337.940487,3487769.687946)
> Pixel Size = (90.00000000,-90.00000000)
> Metadata:
>   AREA_OR_POINT=Point
>     :
> Band 1 Block=4951x1 Type=UInt16, ColorInterp=Gray
> 
> 
> The resulting pix file is:
> 
> Driver: PCIDSK/PCIDSK Database File
> Size is 4951, 4882
> Coordinate System is:
> PROJCS["UTM Zone 38, Northern Hemisphere",
>     :
> Origin = (561337.940487,3487769.687946)
> Pixel Size = (90.00000000,-90.00000000)
> Metadata:
>   SOFTWARE=GDAL1320
>   FILE_ID=gm_UInt16.pix
>   GENERATING_FACILITY=Created with GDAL
>   DESCRIPTION1=
>   DESCRIPTION2=
>   DATE_OF_CREATION=11_47 17-May-06
>   DATE_OF_UPDATE=11_47 17-May-06
> Corner Coordinates:
>     :
> Band 1 Block=4951x1 Type=UInt16, ColorInterp=Undefined
>   Description = Image band 1
> 
> 
> When I use PCI's Freeview v10.0 is displays the image in "checkerboard"
> pattern, usually indicating a confusion about the pixel bit depth.   And a
> right click on the layer in Freeview shows "1 [8U] Image Band 1", confirming
> that it wrongly thinks the data is unsigned 8-bits per pixel.
> 
> Is there some other setting or procedure with GDAL I can use to get 16-bit
> PCIDSK files?
> (FYI, I tried adding -co "BANDDESC1=Height", but no improvement in the
> result).

Brent,

I have reproduced this problem.  I'd appreciate it if you could file a bug
against GDAL for the issue.

In the meantime, PCI should support TIFF and GeoTIFF well.

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    | President OSGF, http://osgeo.org




More information about the Gdal-dev mailing list