I am trying to rasterize a vector with the QGIS 3.4 rasterize tool (not saga or grass tools). I prefer using this tool cause it is much faster. The values which i would like to burn are found in the "cost_value" field(there is only one value in this case which is 2934). The no data value should get -9999. After i run the tool all of the values from the raster get the values from "cost_value" field. Simply said: all the pixels have the value from "cost_value" and none of them get -9999 even though i am rasterizing only one line geometry.
Rasterize Vector to Raster – QGIS 3.4 Guide
qgisrasterizationvector
Best Answer
You are creating a raster of 1 pixel with and 1 pixel height.
Your raster have 1 cell, which is touched by the vector and assumes that value.
There must be enough pixels to find cells that not meet the condition of being touched by the vector.