Closed corviday closed 2 years ago
I have checked, and it looks like we can just do BELOWMINCOLOR=extend
to get the results we want!
Here's how the maps look now:
Here's with BELOWMINCOLOR=extend
:
Charles prefers <1mm/day transparent, so leave it as is.
We want to display precipitation on the map with a logarithmic scale, otherwise the colour gradations are too subtle to see. This is difficult, because precipitation is often 0, which cannot be represented as a log of anything.
ncWMS in theory provides a way to handle this: you can supply a range of values to be rendered with the
COLORSCALERANGE
parameter, and than any values outside that range will be coloured as speified by theBELOWMINCOLOR
andABOVEMAXCOLOR
parameters.However, we found that the ancient version of ncWMS the PDP used to use (1.x running on pizza) ignored the
BELOWMINCOLOR
parameter, and rendered all values outside the range set byCOLORSCALERANGE
opaque black. As a workaround, we created a custom palette whose minimum value was black and whose maximum value was cyan, and used that to render logscaled precipitation, so that the minimumCOLORSCALERANGE
value, which was rendered as black on the custom palette, blended smoothly with the black outside-of-range values.The PDP's ncWMS has been updated, and no longer renders all out-of-range values as black, so this strategy no longer works. Currently out-of-range values are rendered transparent, but hopefully we can now just use the
BELOWMINCOLOUR
parameter instead of complicated workarounds.