Eidcappsup 6877 wms tif byte classification
The 'bytetype' property has been added to the map definition part of the document model. This property is used to determine if 'scaling' should be added to a generated mapfile when the metadata document refers to a raster dataset for which a wms can be generated. If true then the scaling instructions are NOT added to the mapfile, otherwise they are added.
The editor has been updated to present bytetype yes/no radio buttons when required, here are examples of when it should and shouldn't be visible and what it looks like:
Radio buttons show when type=raster and styling=classification:
Radio buttons do not show when type does not equal raster:
Radio buttons do not show when styling does not equal classification:
This is what the mapfile looks like when we set the radio button 'yes' - ie this is a geotiff of type byte and you WILL NOT see any SCALE processing commands:
DATA "ukish10k.tif" PROCESSING "BANDS=1" PROCESSING "RESAMPLE=NEAREST" CLASS NAME "0 to 0.5" EXPRESSION (0 < [pixel] AND [pixel] <= 0.5) STYLE COLOR "#FF0000" END END CLASS NAME "> 0.5" EXPRESSION (0.5 < [pixel] AND [pixel] <= 1) STYLE COLOR "#0000FF"
This is what the mapfile looks like when we set the radio button to 'no' - ie this is a geotiff not of type byte and you WILL see SCALE processing commands:
DATA "ukish10k.tif" PROCESSING "BANDS=1" PROCESSING "RESAMPLE=NEAREST" PROCESSING "SCALE=0,1" PROCESSING "SCALE_BUCKETS=2" CLASS NAME "0 to 0.5" EXPRESSION (0 < [pixel] AND [pixel] <= 0.5) STYLE COLOR "#FF0000" END END CLASS NAME "> 0.5" EXPRESSION (0.5 < [pixel] AND [pixel] <= 1) STYLE COLOR "#0000FF"