How can I use GRASS GIS to get the flat surfaces in this DEM into polygons? The picture is used to show the clearly defined flat surfaces.
2 Answers
Run the aspect tool r.slope.aspect.
Try the < min_slope option set to a very low number. The unclassified areas are your flat area. Play with the setting to get it just how you like. You can then use r.reclass to reclass the aspects created so something like -1 and the gap areas as 1. Now multiply this my the original raster and all your areas are positive.
A better, simpler, and FOSS soultion exists for your specifi need. Just use GDALDEM. Your flat area will get -9999 in one simple operation.
I agree with @just-GIS. You can use the slope or the aspect derivate (r.slope.aspect) from your terrain model to search for flat areas. Once you have identified them and you are OK with the results you can use r.to.vect to convert your raster map into a vector format.