[mapserver-users] Gdal for esri .hdr labelled .bil raw raster

Claude Philipona claude.philipona at camptocamp.com
Tue Aug 28 13:27:35 PDT 2001


> Where did you get this GTOPO data?
I got the data from
http://www.ngdc.noaa.gov/cgi-bin/seg/ff/nph-newform.pl/seg/topo/subset

It is a one.kilometer elevation model based not only on GTOPO, but also other
sources. In the .bil file, data are in int16 (meter).

Thanks this was the problem. I got a .hdr file, but with the wrong format option
(FreeForm ND instead of ESRI).

Now I'm able able show the elevetion map on a browser, but there is still a
problem: The map render in grey level, but all point that are above 255 m are
white. I tried to use the CLASSITEM "[pixel]" to assign color
CLASSITEM "[pixel]"
   CLASS
    EXPRESSION ([pixel] < 1)
      COLOR 0 0 0
    END
   CLASS
    EXPRESSION ([pixel] >= 1 AND [pixel] <50)
      COLOR 255 0 0
    END
    CLASS
    EXPRESSION ([pixel] >= 50 AND [pixel] < 100)
      COLOR 0 255 0
    END
 ..and so on
END
. but I still get most of the map in the color set for pixel value 255. It seems
that when gdal/mapserver convert the 16 bits data to 8 bits (In the .bil file,
data are in int16 (meter).), it just leave the value under 255 unchanged and put
all value above 255 to 255. So the map is pretty useless (most of the point
around alps region are above 255m). I read in the "Raster howto" that there was a
limitation on using CLASS pixel with gdal driver. But how is it possible to
handle the 16bit .bil to have good presentation.

Claude Philipona





More information about the MapServer-users mailing list