4

I'm using QGIS 2.18 (Las Palmas).

I have downloaded Climate-Data from WorldClim and I would like to display all of the monthly maps within the same color scale (and I don't mean within Styles always choosing the same color ramp because if I choose a specific color ramp for January where the Temperatures vary between -40 and -10 and in February the temperatures vary between -20 and +5, the maps will look similar). This has the effect, that when clicking through the maps, the monthly changes become evident, even without having to look at the temperature legend).

Is there a way I can create a color scale for my temperatures between -40 and +20°C although Not all my maps vary between these temperatures?

2

Yes, you can do that of course!

All you have to do is define the min and max values for the "Color gradient" once as you like them. Then either save and load the style per layer or copy/paste it by rightclicking the layer(s) in the "Layers Panel".

  • PS: Make sure to check out the Time Manager plugin once you did this, you can easily create a fancy animation with it! – bugmenot123 May 12 '17 at 14:15
  • I tried, but somehow i wasnt able to get 12 raster layers to be displayed after each other. It kept saying that it didnt find a suitable time format for values.... – rtaani May 12 '17 at 14:57
  • @rtaani Once you have loaded the rasters in the Layers Panel, you can switch through them by simply using the arrow from the keyboard, or I don't understand what do you mean? – mgri May 12 '17 at 15:06
  • I was referring to the Time manager Plugin for Animation. But you are right - i change it manually with the arrow! – rtaani May 12 '17 at 15:18
  • @rtaani I know, I was referring to my answer. So, my solution works for you? – mgri May 12 '17 at 15:56
5

An approach would be creating a style for each raster, ranging from -40°C to +20°C (or whatever you want).

Firstly, right-click on the layer and, from Properties >> Style, try to set it following these steps:

enter image description here

Then, save the style (as a .qml file) going to Style >> Save Style... from the same dialog above, but remember to save it with the same name of the layer to which it refers.

Finally, go to the system folder containing the rasters and copy-and-paste the style for every raster file you want to compare (if you have one raster per month, you need to copy-and-paste the .qml just created for 11 times and then edit the filename).

In this way, you will be able to switch through the several rasters without looking to the legend because the colors for each raster will range from -40°C to +20°C.

  • 1
    Great answer! You can actually copy styles between layers right within QGIS via the right-click menu of the layer panel. You can even select multiple layers and paste the same style to all of them. :)) – bugmenot123 May 13 '17 at 14:19
  • @bugmenot123 yes, but it is temporary if I remember well... – mgri May 13 '17 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.