I made a classification of land and water on an island. Especially on inner bays it becomes really confusing as the water is shallow. Is there a way to trace line that shows the most likely shoreline (possibly with some kind of threshold)? To clarify I have attached one of the images. I am using QGIS.
1 Answer
It is better to process the classified raster image first to remove these salt-and-pepper pixels before converting your raster data to vector shapefile.
GRASS has extended the functionality of QGIS for raster preprocessing. You need to filter the classified raster image using median filter of 3x3 or 5x5 or 7x7, you need to test them individually, to remove the noise in your raster data. If GRASS plugin is installed with QGIS, then you can use r.neighbors to filter the classified image.
After removing the noise from the raster data, then you can convert it to a vector (Polygon) shapefile, and you may need to do another filtering based on the area of the polygons. To accomplish this process you need to covert the polygon shapefile to single parts using Vector -> Geometry tools -> Multiple part to single parts
to calculate the area of polygons individually first, then select the area that is greater than the threshold value that you specify as a final output.