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