I have a polygon layer containing habitat types. It looks something like this: where dark green is forest, yellow are open lands and the other signatures different other habitat types. In order to get something like a forest edge-line, I'd like to create a line shapefile representing those linear structures where forest and open land touch each other. I could of course use the polygons to lines tool in QGIS and then select the forest edge lines by hand - however, my data are too large for this procedure.
Any suggestions on how to approach this problem in QGIS or R? Please note that - unfortunately - I am not familiar with python at all.