Bug report #12695
GDAL Rasterize does not rasterize vectors with field 0
|Affected QGIS version:||2.8.1||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||20801|
All records are rasterized, except those with value of the selected field = 0. This seems inappropriate
#5 Updated by Giovanni Manghi almost 5 years ago
I tested on both QGIS master and 2.8.1 on both Linux and Windows and in all cases, with the provided vector, there are no issues and the polygon with attribute = 0 are correctly rasterized to pixels with value = 0.
If you use the tool and choose "byte" as type for output you must pay attention to the value used for nodata, as -9999 cannot fit in such type and so it is automatically changed to 0.