Working in QGIS 2.8.1 Wien.

I have a raster file with three classes:

"No data" for tiles outside of the country of interest's bounds "0" for tiles that correspond to roads "1" for all other tiles.

I want to use proximity (raster distance) to create a new raster layer of distance to roads for all tiles... but want to maintain the "no data" tiles as "no data".

However, when I run proximity, it ignores any calls to the "No data = " option and assigns distance values to all "no data" tiles. I can't type any string input into the "No data = " option, and am unsure of how to keep my "no data" cells.

How do I do this?

1 Answer 1


No Data values are not stored as "No Data" inside raster files but like any other value. The difference is that the dataset then has a flag which tells QGIS which value to ignore.

You need to find out what value represents No Data in your raster and enter that value into the No Data field in the proximity analysis settings.

You can find the value either with:

  • Properties --> Metadata --> Properties: No Data Value


  • Raster --> Misc. --> Information

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.