Working in QGIS 2.14.0-Wien.

I want to reclassify a raster with the r.reclass GRASS 7 tool, but want to keep the "no data" tiles as "no data".

I understand that I need to create a text "rules" file to inform r.reclass of what classes to create with lines such as "XXXX thru XXX = 1", but am not sure of the syntax to preserve the "no data" tiles.

How do I do that?

2 Answers 2


From GRASS Manual:

Categories to become no data are specified by setting the output category value to "NULL".


Perhaps another way is to set all your values to a text like you mentioned and then for the values you want to keep same (no data) you can use *. e.g:

1 thru 5 = 2
3 thru 8 = 10
* = * 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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