On Nov 9, 2011, at 5:43 PM, Puneet Kishor wrote:

> I am looking for some recent tutes on rendering ERDAS .img files. A bit of 
> the background:
> 
> I inherited these data as an ArcMap .mdb dataset which has metadata.xml, a 
> few other sundry files, and inside a directory with .idb extension, many more 
> folders, each containing a .img file, and a corresponding .rrd and .xml file. 
> A simple layer definition like so allows me to get the tiles displaying in 
> the browser (via OpenLayers) --
> 
>       LAYER
>               NAME    "lyr"
>               TYPE    RASTER
>               DATA    "foo.img"
>               PROCESSING "SCALE=AUTO"
>               STATUS  ON
>               OFFSITE 0 0 0
>       END
> 
> But, the tiles don't make for a continuous image. I can see the tile 
> boundaries. Besides correcting that, I would also like to be able to apply 
> different color ramps, and, finally, I would like to be able to query either 
> single pixel values (click on the map and get the underlying value), or some 
> kind of stats on pixels in an area.
> 
> Would appreciate any tutorials/write-ups if anyone has done this.
> 

I solved the above by specifying a PROCESSING directive with appropriate min 
and max values, and now I get a nicely rendered image. However, I get the 
following in the ms logs --

> [Thu Nov 10 12:45:43 2011].545705 LoadGDALImage(layer): NODATA value 
> -3.40282e+38 in GDAL
> file or PROCESSING directive largely ignored.  Not yet fully supported for
> unclassified scaled data.  The NODATA value is excluded from auto-scaling
> min/max computation, but will not be transparent.

In this particular dataset, the NODATA value is -3.40282e+38. It well might be 
different in a different dataset. I am assuming MapServer is carping because I 
could have set NODATA value somewhere, but didn't, because I don't know how to 
do that. How do I prevent this error message?


Additionally, my rendered image is grayscale. How can I apply a color ramp to 
this image? For example, instead of from white to black, I would like it to be 
from white to red or black to yellow (or whatever). Is there a way to do this 
without having to specify a color value for each of the 256 pixels?


--
Puneet Kishor
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to