Convert vector to raster
From AWF-Wiki
- Click the Add raster layer and select the file C:/OSGeo4W64/geodata/raster/s2/Subset_S2A_MSIL2A_20170619T.tif.
- Click Open, the raster layer appears on the QGIS canvas.
- Click Add vector layer and select file geodata/vector/Subset-Goe_DE021L1_GOTTINGEN_UA2012_UTM32N_reclass.shp containing an integer column indicating the land cover class code.
- In the search engine of the Processing Toolbox, type Rasterize and select Rasterize (vector to Raster) under Conversion of GDAL.
- Select the vector file as the input layer.
- Select C_ID as Attribute field containing the integer class code.
- Select Output size form map resolution per pixel from the drop-down list.
- Enter 10 as the number of Horizontal pixel size (in meters).
- Enter 10 as the number of Vertical pixel size (in meters).
- As Raster extent click Use Layer/Canvas extent and select the loaded raster file (s. above).
Choose Byte (8bit) as Output Raster Type
- Specify the directory inRasterized to save the output file.
- Click on Run to execute the algorithm.
[[File:Qgis_rasterize.png]|500px]