2

I have a raster that I want to reclassify and I'm using GRASS r.recode from within QGIS v.2.4.0. The rules file I am using has this content:

0:149:1
150:229:2
230:379:3
380:459:4
460:*:5

The raster I have has a maximum value of 515 and according to the rules file, it should be reclassified as 5 but the range in the output raster from r.recode is [1,4].

Any ideas as to what is wrong with my rules file?

  • IF you want to reclassify, then consider r.reclass instead of r.recode: grass.osgeo.org/grass70/manuals/r.reclass.html – markusN Oct 5 '14 at 21:31
  • I also tried using r.reclass with the following rules file but got the same result: the range of the output raster is [1,4].0 thru 149 = 1 150 thru 229 = 2 230 thru 379 = 3 380 thru 459 = 4 * = 5 – randusr836 Oct 7 '14 at 18:18
  • Please edit your posting to better show the content of the r.reclass file. Thanks – markusN Oct 7 '14 at 18:20
0

The problem was that I had not loaded the min / max values in the raster layer's style properties.

| improve this answer | |
  • 2
    Is this an answer or comment? – Mapperz Oct 7 '14 at 20:42
  • It's an answer. – randusr836 Oct 8 '14 at 9:09

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.