Re: [mapserver-users] gradient display of raster DEM data
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 michael.sm...@usace.army.mil 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 DATARANGE2800 3500 END END CLASS STYLE COLORRANGE 200 55 55 215 244 244 DATARANGE 3500 4397 END END END From: John Callahan john.calla...@udel.edu Date: Mon, 17 Oct 2011 14:54:13 -0400 To: mapserver-users@lists.osgeo.org mapserver-users@lists.osgeo.org 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 michael.sm...@usace.army.mil 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 john.calla...@udel.edu Date: Fri, 14 Oct 2011 16:55:59 -0400 To: mapserver-users@lists.osgeo.org 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
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 *** John Callahan, Research Scientist Delaware Geological Survey, University of Delaware URL: http://www.dgs.udel.edu * On Fri, Oct 14, 2011 at 5:49 PM, Smith, Michael ERDC-CRREL-NH michael.sm...@usace.army.mil 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 john.calla...@udel.edu Date: Fri, 14 Oct 2011 16:55:59 -0400 To: mapserver-users@lists.osgeo.org 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 mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] gradient display of raster DEM data
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 DATARANGE2800 3500 END END CLASS STYLE COLORRANGE 200 55 55 215 244 244 DATARANGE 3500 4397 END END END From: John Callahan john.calla...@udel.edumailto:john.calla...@udel.edu Date: Mon, 17 Oct 2011 14:54:13 -0400 To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org 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 *** John Callahan, Research Scientist Delaware Geological Survey, University of Delaware URL: http://www.dgs.udel.edu * On Fri, Oct 14, 2011 at 5:49 PM, Smith, Michael ERDC-CRREL-NH michael.sm...@usace.army.milmailto:michael.sm...@usace.army.mil 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 john.calla...@udel.edumailto:john.calla...@udel.edu Date: Fri, 14 Oct 2011 16:55:59 -0400 To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org 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 mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] gradient display of raster DEM data
Excellent! Very cool method. I've used multiple classes for vectors but didn't think about it for rasters. Thanks for the advice. - 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 michael.sm...@usace.army.mil 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 DATARANGE2800 3500 END END CLASS STYLE COLORRANGE 200 55 55 215 244 244 DATARANGE 3500 4397 END END END From: John Callahan john.calla...@udel.edu Date: Mon, 17 Oct 2011 14:54:13 -0400 To: mapserver-users@lists.osgeo.org mapserver-users@lists.osgeo.org 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 *** John Callahan, Research Scientist Delaware Geological Survey, University of Delaware URL: http://www.dgs.udel.edu * On Fri, Oct 14, 2011 at 5:49 PM, Smith, Michael ERDC-CRREL-NH michael.sm...@usace.army.mil 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 john.calla...@udel.edu Date: Fri, 14 Oct 2011 16:55:59 -0400 To: mapserver-users@lists.osgeo.org 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 mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] gradient display of raster DEM data
John, Take a look at the gdaldem utility. http://www.gdal.org/gdaldem.html You likely already have it on your machine already. Aside from being able to generate data products like slope grids, it can produce hillshade images or color relief maps. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of John Callahan Sent: Friday, October 14, 2011 3:56 PM To: mapserver-users@lists.osgeo.org 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 mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] gradient display of raster DEM data
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 john.calla...@udel.edumailto:john.calla...@udel.edu Date: Fri, 14 Oct 2011 16:55:59 -0400 To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org 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 mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users