wiki:WmsExtensions

Non-standard behaviour in ncWMS

ncWMS implements a number of functions that are not defined in the WMS specification. (ncWMS retains backward compatibility with the specification.) This documentation refers to the latest version of the ncWMS code in the Subversion repository.

Styling

The OGC provides a mechanism ("Styled Layer Descriptors") for applying colour maps ("palettes") to raster data. However, the mechanism for specifying the SLD is somewhat complex. ncWMS styles maps using custom parameters in the GetMap request, all of which are optional:

PurposeParameter keyPossible valuesNotes
Select colour paletteEach layer advertises a number of STYLEs, each of which contains the name of the palette file, e.g. STYLES=boxfill/rainbow. See the Capabilities document.Name of palette file (minus file extension)It is compulsory to provide a STYLES parameter in the GetMap URL but the value can be left blank (e.g. &STYLES=&FOO=bar...). Palette files are defined in WEB-INF/conf/palettes and are called name.pal.
Set image opacityOPACITYInteger between 0 and 100 inclusive0 = fully transparent, 100 = fully opaque (default). Only applies to image formats that support partial pixel transparency (e.g. PNG). This parameter is redundant if the client application can set image opacity (e.g. Google Earth).
Set colour scale rangeCOLORSCALERANGE"auto" or "min,max"COLORSCALERANGE omitted: (default) Default scale range used (this is to allow backward compatibility with standards WMS clients, particularly tiling clients: it ensures that the same color scale range is used for each tile). COLORSCALERANGE=min,max: The extremes of the colour scale are set to min and max (in the native units of the variable in question). COLORSCALERANGE=auto: ncWMS sets the scale range to the min and max values of the generated image (i.e. maximum contrast stretch). See ColorScaleRange for more discussion of how ncWMS handles colour ranges.
Set the number of colour bands in the paletteNUMCOLORBANDSAny positive integer up to and including 253Setting this to a relatively low number (e.g. 10) will produce obvious colour banding, giving the appearance of contour lines. Default value is 253.
Set the number of contours for the "contour" styleNUMCONTOURSAny positive integer above 2For contour plots this sets the number of contours to use between the min and max values specified in COLORSCALERANGE. Default value is 10.
Choose from a linear or logarithmic colour scaleLOGSCALEtrue or falseSet true to use a logarithmic spacing between the min and max of the colour scale range. This is particularly useful where data values vary over several orders of magnitude in an image (common in biological parameters). LOGSCALE cannot be set true if the colour scale range includes zero or negative values. Default is false.
Set the colour for values larger than the maximumABOVEMAXCOLOR"extend", "transparent", or a colour in the format 0xRRGGBBWhen specifying a colour directly RR, GG, BB are hexadecimal values for the red, green and blue colour components respectively. "extend" will use the highest value of the palette for values larger than the maximum, and "transparent" will make them transparent.
Set the colour for values smaller than the minimumBELOWMINCOLOR"extend", "transparent", or a colour in the format 0xRRGGBBWhen specifying a colour directly RR, GG, BB are hexadecimal values for the red, green and blue colour components respectively. "extend" will use the lowest value of the palette for values smaller than the minimum, and "transparent" will make them transparent.

Metadata access

ncWMS implements a "GetMetadata" method (in addition to GetMap, GetCapabilities and GetFeatureInfo) that allows clients to access metadata piecemeal, avoiding the need to download a potentially-huge, monolithic Capabilities document. GetMetadata includes metadata not present in standard WMS Capabilities documents (such as units of measure, default colour scale ranges). Metadata are returned in  JSON format for ease of handling on web pages.

Different subsets of metadata are downloaded by providing an "&item=" parameter to GetMetadata. Detailed documentation is TODO but in the meantime see the code in the AbstractMetadataController.

Timeseries plots

Documentation TODO, but in the meantime, See getFeatureInfo() operation in WmsController

Transects

Documentation TODO, but in the meantime, See getTransect() operation in WmsController