Friday, August 12, 2011
We already had tools to style single banded raster, i.e. color ramps on elevation models and similar things.
What was missing was a nice handling of novalues and other values we would not care. Take for example the following map:
This is how an ascii grid is loaded into udig...
Well, we can ask to read the values to propose a colortable through "reset colormap". But that would consider -9999 novalues. Therefore we added the possibility to define other novalues to ignore in the process. Applying that colortable will produce:
Where is the problem? The 0. The map was probably transformed and the altered collar part has been set to 0. We can try to add to the novalues list also the 0 and reset once more:
That is about it, nice, so we now apply one of the predefined colortables, to better look like a DTM:
Well, to really get rid of the 0 novalues, we need to create rules to "hide" those part, else they will not appear transparent and overlay on other layers.
We now added a button that will take the manually defined novalues and create transparent rules for them:
That is what we wanted to have. Just remember to export the style to have the same name as your raster map and the extension .sld, and you are good to go.
Also note that now we have select all/none and invert selection for rules, which get very handy when you need to move rules up and down.