[mapserver-users] mapserver/gdal

Peter deVoil devoilp at dpi.qld.gov.au
Wed Oct 17 20:19:48 EDT 2001


Hi,
I'm using a recent (pre3.5) version of mapserver with gdal raster input from 
esri .bil data. It's elevation in meters. It looks like
--------
$ gdalinfo elzeaa.bil 
Driver: EHdr/ESRI .hdr Labelled
Size is 600, 600
Coordinate System is `'
Origin = (165.000000,-25.000000)
Pixel Size = (0.008333,-0.008333)
Corner Coordinates:
Upper Left  ( 165.0000000, -25.0000000) 
Lower Left  ( 165.0000000, -30.0000000) 
Upper Right ( 170.0000000, -25.0000000) 
Lower Right ( 170.0000000, -30.0000000) 
Center      ( 167.5000000, -27.5000000) 
Band 1 Block=600x1 Type=Int16, ColorInterp=Undefined
  Min=-32768.000/0, Max=32767.000/0
  NoData Value=-9999
---------

I'm trying to build a classification for this and am unsure of how gdal is 
mapping 2 byte values to 0:255 as the manual implies:
> " Some format drivers (ie. GDAL) cast the pixel values to the range
>  0 to 255 before applying the classification scheme to them,"

Am I correct that the high byte of elevation data is lost? This would imply I have to convert Int16 -> unsinged char, and a pointer to a method for this would be appreciated.

Yours,
PdeV.




More information about the mapserver-users mailing list