I have a vector layer which i am trying to rasterize. It is smaller than the study area. The end goal is to create a layer with euclidean distance from said rasterized vector layer.
When rasterizing, I use another raster layer covering the whole study area for the output extent. I think this should give me the value 1 for "presence" of my vector and 0 for "absence" in the respective locations. However, I get the value 1 for all cells in my raster layer but the color is differentiated according to the vector i rasterized. The black pixels form the correct shape but the surrounding transparent pixels have the same value.
How do I get this raster with the transparent pixels set to 0?
I followed the answer to this question: Calculating distance to points in QGIS and added a new column to my attribute table which i populated with 1 before rasterizing. I used this field as my "field to use for burn-in value". I believe this might be where my mistake stems from but if I leave that field empty i get a completely empty raster layer with values that don't make sense (see layer "Rasterized" in screenshot).
I also tried to set the accuracy in the layer styling panel to actual but to no avail.