[mapserver-users] Gdal for esri .hdr labelled .bil raw raster
Frank Warmerdam
warmerdam at pobox.com
Tue Aug 28 14:36:17 PDT 2001
Claude Philipona wrote:
>> . 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,
Good questions. The general theory is that users should be preprocesing
their files into web ready form (ie. performing down sampling in advance).
However, especially for something like classifying 16bit data I can see
that proper behaviour in MapServer would be desirable. I will add it to
my TODO list to make classification work properly (through GDAL) for non-eight
bit data. Note that to make this work properly for floating point data, I
will need to evaluate the classification expressions for ever pixel of real
data as opposed to the current approach of evaluating it for each of the
256 entries in the colortable, but no more. This could be pretty expensive!
Furthermore, I think there should be a way of having MapServer do scaling
in cases where you don't want to setup a complex classification scheme.
Steve, is it OK for us to add extra override information via the METADATA
block, or is that intended to be just for WMS related stuff? I would like
to have GDAL interogate a SCALE parameter which could have the arguments
MIN and MAX or the word AUTO indicating that a min/max pair should be
computed from the data. This would be the default if not specified I
suppose. Of course, the scaling wouldn't apply for classified rasters.
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
More information about the MapServer-users
mailing list