Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have Cyprus Corine map with 44 different types of land use. I want to run a raster calculator query or any other way to isolate the areas with codes 10 to 22 and 26 to 34, all other values 1 to 44 will be excluded. When I open the Corine Raster layer and I choose the Identify Features Tool I always see the Band 1 under the Feature Category, the number under the Value Category it change every time I chose a different place, when I try to run the query it choose all the values. I found the map from: at the end of the page on the right choose: How can isolate the values I want to save as a new Raster map?

share|improve this question
What software are you using? And exactly what "query" are you running? BTW, the data can be directly downloaded at – whuber Feb 9 '13 at 15:19
QGIS. Finally I found the solution! ((ID>=9AND<=23)OR(ID>=25<=35)) – Stelios Feb 9 '13 at 19:16
That's the right idea, but the expression is not correct: either you need to use strict inequalities "<" and ">" or else you need to set the endpoints to 10, 22, 26, and 34. – whuber Feb 9 '13 at 20:05

You could try the inlist function under raster calculator.

It will keep all the values that you want and give nodata to the excluded ones.

share|improve this answer
Welcome to GIS SE! You may want to edit your Answer to embed a link to the "inlist function" as an aid to its readers. – PolyGeo Jan 16 '14 at 0:33
In many circumstances this is a good solution; thank you for reminding us of it. (An example of its use would be helpful.) In the current context the command would require you either to list the 22 values to include or the 22 values to exclude; both are much longer, more opaque, and more subject to error than the simple combination of inequalities suggested in a comment to the question. – whuber Jan 16 '14 at 0:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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