[Qgis-developer] color ramps improvements

Etienne Tourigny etourigny.dev at gmail.com
Fri Aug 3 07:52:57 PDT 2012


As Paolo has written,

I have merged two features - color ramps for rasters, and cpt-city color ramps

I have also implemented some new tests - new file testqgsstylev2 for
gradients (generic, ColorRamp and cpt-city), and also in
testqgsrasterlayer, to make sure the gradients render correctly.
I would encourage others to write some tests for rendering of vector
layers as there was nothing of the sort yet.

Please send me feedback and suggestions, with the understanding that
this is a first implementation and needs some refinement - based on
your feedback!

I am investigating (with the help of Jim) which files we could
distribute with qgis (only those with an explicit license  that allows
us to redistribute, such as CC3, GPL, GPLv2, Apache), and would
appreciate any comments on

1) how could we distribute those - media (optional package, zip file)
and format (native svg, qml, one big xml file)
2) how many should we distribute, which ones, and how to group them?

answers below:

On Fri, Aug 3, 2012 at 11:06 AM, Paolo Cavallini <cavallini at faunalia.it> wrote:
> Hi all.
> Just tried the improvements by Etienne & Jim:
> - quite nice to have the same ramps for both vectors and rasters
> - it would be very good if the download & unzip of colour ramps would be
> made automatic, single-clicky-style

is there an existing infrastructure for this in qgis/qt to do the following?

1) download the file
2) unzip - I have added the GDAL funcitons to read zips, but not sure
if it's easy to unzip a file.

> - would be good if one could filter them by metadata (e.g. "slope")

where would you get the metadata from?  There is metadata for author,
group, but not for each gradient. Do you mean the gradient name?

> - how about setting a few of them by default (e.g. for dtm, slope,
> etc.), without the need for the user to create a new one?

Someone would have to step in, select a few and propose them. These
would be part of the symbols available by default.

I think that this will be easier once Arun's work on symbology
grouping and "social styles" is merged.

I have just made a basic structure to browse the gradients.

> - the clutter could be reduced removing some of the ramps already
> present, especially beacuse most of them are derived by ColorBrewer,
> already present in cpt

Are you talking about clutter in the style manager or the cpt-city dialog?
If the latter - In this case you have about 3-4 groups which are
duplicated, out of more than 100, so I don't see how it adds to
clutter.

I thought about removing the ColorBrewer option(as they are available
in cpt-city), but it is still relevant because there are fewer options
to choose from and it is simpler (and nicer) to work with.

> - one very important feature of the 1-band plugin, still missing here,
> is the capability of classifying based on equal area, etc.

This topic is more related to how the gradient is applied to the
raster/vector, so this sort of lies outside of the cpt-city dialog (I
think) - unless those classification methods are tied to specific
gradients?

Another functionality from 1-band plugin that is missing is the
possibility to invert colors and palette. This would be very useful,
but should it be inside the style manager or in the vector/raster
layer dialogs?
Because you can select

> - the raster layer property dialog should be made more clear, and more
> homogeneous with that of vectors.

I agree - perhaps you can submit a mock-up?

> Thanks a lot for this great improvement!
> All the best, and many thanks.

glad you like it, and thanks to Jim for all his help

> One more: I think the default listing should be by theme, not by author.

hmm do you mean the selection view? Because aside from that there is
no "theme" grouping yet.

Etienne

>
> --
> Paolo Cavallini - Faunalia
> www.faunalia.eu
> Full contact details at www.faunalia.eu/pc
> Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the Qgis-developer mailing list