I am working on QGis with a shapefile with an attribute table, I have created this shapefile through "Vector->Analysis tools->Count Points in Polygon", so this new shapefile got the count in the attribute table.

enter image description here

I want to convert now this shapefile to a "heatmap" in raster format.

I am trying to do it with "Raster->Conversion->Rasterize", burning the values of the attribute table

enter image description here

In those polygons with number=0 QGIS doesn't draw the polygons in the raster.

enter image description here

I would like to get all those polygons filled in the raster, I know I could erase all those polygons in the attribute table with data, then change all the 0s to 1, and then rasterize it, merging both rasters (the original with empty polygons and the new one with only the "empty" polygons filled). I think this is just too tricky .

Is there any other solution?

1 Answer 1


In the Rasterize tool, notice the option to set a nodata value:

Assign a specified nodata value to output bands [optional]

You have 0.000000 set as the optional nodata value, so all polygons with 0 in their burning field are converted to nodata values in the raster.

Clear the nodata value by clicking the X button in the nodata box:

  • Thanks!, I was setting burn value to 1.0000 also, I didn't know that burn value could be empty.
    – Héctor
    Aug 20, 2019 at 18:51

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.