0

How do I set conditions in QGIS (ie. temperature map, show only areas that meet certain condition (avg temp 9-21 celsius) ?

basically, I want my map to show only areas that meet the condition (certain temperature, certain hours of sunlight per years...) stuff like that. Would also be cool if I could overlap those.

underdark
  • 84,148
  • 21
  • 231
  • 413
Dan Ionis
  • 11
  • 3
  • Welcome to gis.stackexchange! Please note that a good question on this site is expected to show some degree of research on your part, i.e. what you have tried and - if applicable - code so far. For more info, you can check our [faq]. – underdark May 05 '18 at 13:14

1 Answers1

1

One way to do that is to filter your layer using a formula based on one (or ++) attribute of your table. Go to layer properties/General/Provider feature filter and build your query using the query builder button.

If your have overlapping conditions u should rather try a rule based rendering of your layer. Go to layer properties/style/choose rule-based and build the differents rendering rules of your layer.

Snaileater
  • 5,743
  • 1
  • 15
  • 26
  • I don't have those settings, I downloaded this map http://worldclim.org/version2 The avg temperature one in highest resolution will raster calculator do the trick? one more edit> nope, don't know how to use the raster calculator, in the color gradient I can change the values, is that the temperature? – Dan Ionis May 04 '18 at 18:47
  • i think u're talking about raster layers which are 'images' my answers were refferring to vector layers (which are point, line or polygon geometries) ... – Snaileater May 04 '18 at 18:57
  • Yup, I understand that. You're right, I am using raster images. Check this: https://imgur.com/a/XGXpn6m Does this mean that all I have to do is enter the style settings, set the color gradient minimum and maximum to what I want, and that's it? – Dan Ionis May 04 '18 at 19:07
  • i'm not so used to raster data but check this link which should be the answer to your question : https://gis.stackexchange.com/questions/27359/filtering-a-raster-by-pixel-value-qgis – Snaileater May 04 '18 at 19:21
  • Greatly appreciated sir, I'll see what I can do – Dan Ionis May 04 '18 at 19:22
  • Hi @DanIonis and snaileater. In the Layer Properties | Transparency tab, there is Custom transparency options where you can add transparent zones by clicking green plus icon. Try adding From=0 and To=9. – Kazuhito May 04 '18 at 22:32