I am working with QGIS and am trying to convert a raster layer into a vector layer. I have converted it to a polygon from raster (image below), and then wish to dissolve this polygon into a single vector shape. This has worked for the majority of the shape, but at some longitude there is an error, and it only dissolves vertically but not horizontally (2nd image below).

Has anyone had this error before, or can anyone recommend a different approach to get a vector layer from a raster?

I have used the Dissolve function, and also tried the GDAL/Grass dissolve functions with no success.

Polygonized layer

Dissolved layer - successful on left side, partially successful on right


Do a little Buffer, then Dissolve, then Multipart to singleparts, and finally do the same but negative Buffer.

If you populate an attribute with the same value for all polygons, then can use the GRASS dissolve algorithm for that value with a little threshold.

Another approach (seems to me the better) is calculate a derivated raster that contains just values 1 for the areas to polygonize and values 0 for the others, and use the GDAL Polygonize (raster to vector) tool. Then, delete the polygons populated with 0 in the DN field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.