I am preparing a set of environmental variables and I am fairly new to QGIS.
I am in possession of a land cover raster layer (downloaded from Copernicus) which I have reclassified for my study area into forest (green) and non-forest (black) - see picture below.
I would like to derive a raster layer for my study area that expresses for each cell the distance (in meters) to the nearest forest edge; raster grid cells outside and inside forest polygons should be associated with positive and negative distance values, respectively.
How can this be done in QGIS? Do I have first to convert the raster into a vector, or can I use the raster directly?