Thanks guys.  Adding an EXPRESSION for each class worked great.  When using only one class, the EXPRESSION was not necessary.  I&#39;m using RGB and everything looks great.  <div><br></div><div>Any thoughts about the Legend Graphic?  I saw some brief discussions on the doc page.<br>
<div><br clear="all"><div>- John</div><div><br></div><div><br></div><br>
<br><br><div class="gmail_quote">On Mon, Nov 21, 2011 at 9:09 AM, Mark Volz <span dir="ltr">&lt;<a href="mailto:MarkVolz@co.lyon.mn.us">MarkVolz@co.lyon.mn.us</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
John,<br>
<br>
I was able to get datarange and classrange to work.  However I found a couple issues:<br>
<br>
1) I had to include an expression for the raster range.  - This may have been fixed in newer versions of MS.<br>
2) I was getting unwanted black areas on my map.  - I was using PC256  (to make the image smaller), I had to revert to RGB, which has more colors.  Mapserver did not report an error when I was using PC256.<br>
<br>
<br>
<br>
CLASS<br>
        EXPRESSION ([pixel] &gt;= 1030 AND [pixel] &lt; 1133)<br>
        STYLE<br>
                COLORRANGE 176 240 232 255 255 179<br>
                DATARANGE 1030 1133<br>
        END<br>
END #class<br>
<br>
<br>
<br>
Mark Volz<br>
GIS Specialist<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>] On Behalf Of <a href="mailto:mapserver-users-request@lists.osgeo.org">mapserver-users-request@lists.osgeo.org</a><br>

Sent: Sunday, November 20, 2011 11:00 AM<br>
To: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
Subject: mapserver-users Digest, Vol 46, Issue 53<br>
<br>
Send mapserver-users mailing list submissions to<br>
        <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:mapserver-users-request@lists.osgeo.org">mapserver-users-request@lists.osgeo.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:mapserver-users-owner@lists.osgeo.org">mapserver-users-owner@lists.osgeo.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of mapserver-users digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Re: gradient display of raster DEM data (John Callahan)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Sat, 19 Nov 2011 13:51:38 -0500<br>
From: John Callahan &lt;<a href="mailto:john.callahan@udel.edu">john.callahan@udel.edu</a>&gt;<br>
Subject: Re: [mapserver-users] gradient display of raster DEM data<br>
To: &quot;<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>&quot;<br>
        &lt;<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>&gt;<br>
Message-ID:<br>
        &lt;CAL=<a href="mailto:axXkvjPjKKbY%2B2FFf0r6Cf8YaRP7ZGmLGvC21GKDnXWMbZQ@mail.gmail.com">axXkvjPjKKbY+2FFf0r6Cf8YaRP7ZGmLGvC21GKDnXWMbZQ@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
Thanks again for the idea of using multiple classes but I can&#39;t seem to get<br>
it to work.  Has anyone else had success with this method?  It seems as<br>
though it&#39;s applying only the first defined COLORRANGE to full range of the<br>
values in the dataset.<br>
<br>
I&#39;ve tried using the below syntax (only COLORRANGE and DATARANGE in each<br>
CLASS) as well as the (proposed?) block syntax as defined at<br>
<a href="http://mapserver.org/development/rfc/ms-rfc-6.html" target="_blank">http://mapserver.org/development/rfc/ms-rfc-6.html</a>  (which gives me errors<br>
for RANGEITEM and invalid hex color for MINCOLOR.)<br>
<br>
I am using MapServer 6.0.1 as part of MSW 3.0.3.<br>
<br>
Incorrect image being displayed: <a href="http://i44.tinypic.com/2hdwuuu.jpg" target="_blank">http://i44.tinypic.com/2hdwuuu.jpg</a><br>
<br>
Correct image, created through QGIS: <a href="http://i42.tinypic.com/21d2x5h.jpg" target="_blank">http://i42.tinypic.com/21d2x5h.jpg</a><br>
<br>
<br>
Here is the LAYER portion of my map file. Is there anything obvious I<br>
should change?   Thanks for any suggestions.<br>
<br>
***********<br>
  LAYER<br>
    NAME &#39;de_dem2m&#39;<br>
    TYPE RASTER<br>
    DATA &#39;C:\data\delaware2m.img&#39;<br>
PROCESSING &quot;CLOSE_CONNECTION=DEFER&quot;<br>
EXTENT 166773.496 49314.974 233217.496 204730.974<br>
    METADATA<br>
      &#39;ows_title&#39; &#39;Delaware DEM&#39;<br>
   INCLUDE &quot;ogc_projections.map&quot;<br>
      &#39;wms_include_items&#39;   &#39;all&#39;<br>
    END<br>
    STATUS ON<br>
DUMP TRUE<br>
    TRANSPARENCY 100<br>
    PROJECTION<br>
      &quot;init=epsg:26957&quot;<br>
    END<br>
<br>
  CLASS<br>
   STYLE<br>
      COLORRANGE 170 230 209 255 255 179<br>
      DATARANGE 0.0 7.0<br>
   END<br>
  END<br>
<br>
  CLASS<br>
   STYLE<br>
      COLORRANGE 255 255 179 0 128 64<br>
      DATARANGE 7.01 11.0<br>
   END<br>
  END<br>
<br>
  CLASS<br>
   STYLE<br>
      COLORRANGE 0 128 64 252 186 3<br>
      DATARANGE 11.01 14.0<br>
   END<br>
  END<br>
<br>
  CLASS<br>
   STYLE<br>
     COLORRANGE 252 186 3 199 15 2<br>
     DATARANGE 14.01 20.0<br>
   END<br>
  END<br>
  CLASS<br>
   STYLE<br>
      COLORRANGE 199 15 2 105 48 13<br>
      DATARANGE 20.01 40.0<br>
   END<br>
  END<br>
<br>
  CLASS<br>
   STYLE<br>
      COLORRANGE 105 48 13 171 171 171<br>
      DATARANGE 40.01 100.0<br>
   END<br>
  END<br>
<br>
  CLASS<br>
   STYLE<br>
      COLORRANGE 171 171 171 232 230 232<br>
      DATARANGE 100.01 140.0<br>
   END<br>
  END<br>
<br>
  END<br>
*********************<br>
<br>
- John<br>
<br>
***********************************************<br>
John Callahan, Research Scientist<br>
Delaware Geological Survey, University of Delaware<br>
URL: <a href="http://www.dgs.udel.edu" target="_blank">http://www.dgs.udel.edu</a><br>
*************************************************<br>
<br>
<br>
<br>
On Mon, Oct 17, 2011 at 3:05 PM, Smith, Michael ERDC-CRREL-NH &lt;<br>
<a href="mailto:Michael.Smith@usace.army.mil">Michael.Smith@usace.army.mil</a>&gt; wrote:<br>
<br>
&gt;  John,<br>
&gt;<br>
&gt;  I got a larger color range by using multiple classes<br>
&gt;<br>
&gt;  LAYER<br>
&gt;   NAME &quot;hillshade&quot;<br>
&gt;   TYPE raster<br>
&gt;   TILEINDEX<br>
&gt; &quot;/benchmarking/wms/2011/data/raster/DEM/bil_16int/dem_bil16int.shp&quot;<br>
&gt;   PROCESSING &quot;CLOSE_CONNECTION=DEFER&quot;<br>
&gt;   PROJECTION<br>
&gt;        &quot;+init=epsg:4326&quot;<br>
&gt;   END<br>
&gt;   CLASS<br>
&gt;     STYLE<br>
&gt;       COLORRANGE  46 154 88 251 255 128<br>
&gt;       DATARANGE   1003 1800<br>
&gt;     END<br>
&gt;   END<br>
&gt;   CLASS<br>
&gt;     STYLE<br>
&gt;       COLORRANGE  251 255 128 224 108 31<br>
&gt;       DATARANGE   1800 2800<br>
&gt;     END<br>
&gt;   END<br>
&gt;  CLASS<br>
&gt;     STYLE<br>
&gt;       COLORRANGE   224 108 31  200 55 55<br>
&gt;       DATARANGE    2800 3500<br>
&gt;     END<br>
&gt;   END<br>
&gt;   CLASS<br>
&gt;     STYLE<br>
&gt;       COLORRANGE  200 55 55  215 244 244<br>
&gt;       DATARANGE   3500 4397<br>
&gt;     END<br>
&gt;   END<br>
&gt; END<br>
&gt;<br>
&gt;<br>
&gt;   From: John Callahan &lt;<a href="mailto:john.callahan@udel.edu">john.callahan@udel.edu</a>&gt;<br>
&gt; Date: Mon, 17 Oct 2011 14:54:13 -0400<br>
&gt; To: &quot;<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>&quot; &lt;<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>&gt;<br>
&gt; Subject: Re: [mapserver-users] gradient display of raster DEM data<br>
&gt;<br>
&gt;  Thanks for all your responses.  I have COLORRANGE / DATARANGE working<br>
&gt; fine in my map file. Works very well.  I&#39;m also looking at using gdaldem<br>
&gt; for a more custom color scale.  Thanks again.<br>
&gt;<br>
&gt; - John<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Oct 14, 2011 at 5:49 PM, Smith, Michael ERDC-CRREL-NH &lt;<br>
&gt; <a href="mailto:Michael.Smith@usace.army.mil">Michael.Smith@usace.army.mil</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt;  John<br>
&gt;&gt;<br>
&gt;&gt;  The DATARANGE / COLORRANGE keywords will be fully documented by 6.2 but<br>
&gt;&gt; they have been present in MapServer for years (since 4.6 or so).<br>
&gt;&gt;<br>
&gt;&gt;  We used DATARANGE / COLORRANGE for dem display in this years FOSS4G WMS<br>
&gt;&gt; Benchmarking effort.<br>
&gt;&gt;<br>
&gt;&gt;  Mike<br>
&gt;&gt;<br>
&gt;&gt;   --<br>
&gt;&gt; Michael Smith<br>
&gt;&gt;  US Army Corps<br>
&gt;&gt; Remote Sensing GIS/Center<br>
&gt;&gt;<br>
&gt;&gt;   From: John Callahan &lt;<a href="mailto:john.callahan@udel.edu">john.callahan@udel.edu</a>&gt;<br>
&gt;&gt; Date: Fri, 14 Oct 2011 16:55:59 -0400<br>
&gt;&gt;<br>
&gt;&gt; To: &lt;<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>&gt;<br>
&gt;&gt; Subject: [mapserver-users] gradient display of raster DEM data<br>
&gt;&gt;<br>
&gt;&gt;  I know this has been asked before but I thought I&#39;d ask to see if<br>
&gt;&gt; anything changed.<br>
&gt;&gt;<br>
&gt;&gt;  I&#39;m looking to display a raster digital elevation model in mapserver.<br>
&gt;&gt;  My data is in flat files, img and tiff.  I&#39;d like to display this data as<br>
&gt;&gt; a continuous gradient color range, rather than using CLASS categories/bins<br>
&gt;&gt; for specific colors.  Is it still tru ethat this is not possible, easily?<br>
&gt;&gt;<br>
&gt;&gt;  One method (passed to me on this list) was too generate the colored<br>
&gt;&gt; image I want in another program, using GMT or similar tool, then use that<br>
&gt;&gt; in mapserver.  This seems like the best option but is non-trivial to<br>
&gt;&gt; someone who hasn&#39;t done this before.  (though not terribly difficult.)<br>
&gt;&gt;<br>
&gt;&gt;  I also read about the use of DATARANGE and COLORRANGE in mapserver.<br>
&gt;&gt;  However, these are not in the documentation.  Are these available in trunk<br>
&gt;&gt; only?  A ticket was generated that seems to say this will be included with<br>
&gt;&gt; MS 6.2.  (<a href="http://trac.osgeo.org/mapserver/ticket/1305" target="_blank">http://trac.osgeo.org/mapserver/ticket/1305</a>)  Any insight on<br>
&gt;&gt; whether this is still the plan?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;  Thanks for your help and advice.<br>
&gt;&gt;<br>
&gt;&gt; - John<br>
&gt;&gt;<br>
&gt;&gt;  ***********************************************<br>
&gt;&gt; John Callahan, Research Scientist<br>
&gt;&gt; Delaware Geological Survey, University of Delaware<br>
&gt;&gt; URL: <a href="http://www.dgs.udel.edu" target="_blank">http://www.dgs.udel.edu</a><br>
&gt;&gt; *************************************************<br>
&gt;&gt;<br>
&gt;<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111119/6e425339/attachment-0001.html" target="_blank">http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111119/6e425339/attachment-0001.html</a><br>

<br>
------------------------------<br>
<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br>
<br>
End of mapserver-users Digest, Vol 46, Issue 53<br>
***********************************************<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</blockquote></div><br></div></div>