I have very large raster, whih is basically merge of smaller rassters : enter image description here

I would like to create separate polygons for each "group" of pixels with values, to get something like this (sorry for the quality of drawing, it suppose to be separate polygons): enter image description here

I have tried to do this with qgis tool "extract layer extent" , but it did not break the small rasters into polygons, but created large polygon based on the extent: enter image description here

As this didn't work, I was looking for solution like "difference" but between polygon and raster, however, I haven't found yet, and as the raster extent is very large it seems to not work.

I'm looking for other tools/plugins that I can use in order to get separate polygons for the not null grouped pixels.

Edit: for now I have made not very esthetic workaround,which is to generate small polygon around each part-raster, clip it (to break the big raster to small raster), then vectorize the small raster and then dissolve the pixels-polygons. However, I'm still looking for better methods to do that ,I'm sure there are.

  • Are the purple areas where there werent any smaller raster? Do you have access to the smaller rasters?
    – BERA
    Nov 24, 2022 at 10:06
  • @BERA the purple area is the extent of the raster, the smaller rasters are what I want to get is polygons of the small rasters. There are more small rasters outside of the image I took which makes the extent larger.
    – ReutKeller
    Nov 24, 2022 at 12:50
  • Do you still have access to the original/smaller rasters?
    – BERA
    Nov 24, 2022 at 14:27

1 Answer 1


Use the raster calculator to create a new binary raster, with 0 where the values of the original raster are NULL, 1 everywhere else. Then use polygonize to create a polygon layer which will have one polygon for each of your original rasters, and one (or more) for all the NULL values.

  • 1
    Raster calc expression would be something like: gis.stackexchange.com/a/428556/2856
    – user2856
    Nov 25, 2022 at 4:33
  • this is good option. The problem is that I still need to run calculations on very large area
    – ReutKeller
    Nov 28, 2022 at 8:58
  • Unless you have to do this often on many different rasters, just let your computer do the work. Who cares if it takes a while. It will be faster than waiting for a different answer.
    – Llaves
    Nov 29, 2022 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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