TransWikia.com

Creating a polygon from all raster values >0 in QGIS?

Geographic Information Systems Asked on April 6, 2021

I have a raster layer with two values, 0 and 1. I want to create a polygon shape from all the 1 values.

I expected the "raster to vector" tool to achieve this, but this created another grid as a shapefile (i.e. every square of the raster became its own polygon).

Am I using the correct tool and/or the correct settings?

One Answer

You can use Menu Raster / Converstion / Vectorize raster layer (screenshot 1). On the output layer, apply Select Features by Expression… and insert "DN" = 0 to the expression editor (screenshot 2), thus selecting all polygons where the raster value is 0: these are the ones you want to delete. Now delete the selected features and you are left just with the polygons representing raster values = 1.

enter image description here

enter image description here

Correct answer by Babel on April 6, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP