Friday, November 12, 2010

uDig styles and filters - human readable... the fun is on!!!

You might remember my post about udig and filters, where I stated that filters were given in xml form. Well, thanks to a good comment of Andrea Aime, I tried a simple tweak and now we have filters in a simple and easy human readable form, supporting the amazing power of geotools' filter mechanics.
Thank God those guys exist :)

An example?

I have a map with rivers in it:

Now I want to create a rule that only displays those rivers that are longer than 2000 meters. The CQL function length comes to help me. Insert it into the filter textbox, press the apply button and here we go:

It is easy now to add in another rule and color those that are shorter than 2000 meters:

Nice ha? coming in your next uDig release :)

PS: some examples from the geotools site.