I am using the "Proximity (raster distance)" tool in QGIS to calculate the distance from each pixel to the nearby forest.
I created the proximity map using the forest raster as input but the output seems all black and the values shown are zeros. I tried to change the symbology and see but its still the same.
Input data: Corine Landcover 2018 with classes 23, 24 and 25 (forest) only and clipped to the extent of Norway. Reprojected in QGIS to ETRS89 / UTM zone 33N – EPSG:25833.
Best Answer
I downloaded the CLC 2018 raster data to test how the Proximity Tool works with this data.
I was able to produce the following output:
To do this I:
The result did come up as appearing to be all black (as you experienced) but this seemes to be how the raster is presented, with no streching of the pixel values. QGIS is trying to draw the full range of pixel values (0 to 21900 in my case), so everything appears to be black.
This can be fixed one of two ways:
Hit apply and it should present as you wanted it. Just remember the resolution of the image is 100m, so try stick to those intervals. If you want to include more of the classes you can either add them in the Promiximity tool's options or you can Reclass the image identifying those pixel values representing Forest.
UPDATE WITH SOURCE DATA
Here is the data as provided through the WeTransfer link:
The legend shows the forest having a pixel value of 23.
Running the proximity tool I set the "List of pixel values" to 23.
The OUTPUT:
I opened the Layer Properties, and the Symbology Tab. Changed the Render Type to "Singleband pseudocolor" Changed the Mode to "Quantile" Changed the "Classes" to 15 Hit the "Classify" button and then Apply
Here is the result:
I think you may be there with your method, just a little refinement in the presentation.