Vector to raster conversion¶
This note shows how to convert a vector to a raster. It does not deal with interpolation.
Plugins : GdalTools
Converting a vector to a raster is provided by the core plugin GdalTools. This plugin should be installed and active when you install QGIS, and provides the Raster menu. If the Raster menu is not present, then you can activate the plug0in by using Settings → Manage Plugins and ensuring that the checkbox for GdalTools is selected.
From the Raster menu select Conversion and then Rasterize (Vector to Raster)
Raster → Conversion → Rasterize (Vector to Raster)
You can either “Select” any layer or use a layer from your current QGIS session in the dropdown list.
An Attribute field, which rasterize colours on and provides information to the identify tool.
A size for the image. This is essentially a resolution; the more pixels, the more resolution and the bigger the image is.
Load into canvas when finished is fairly self explanatory.
Last part of this window shows the command that is actually being run.
A rastered version of the Alaska shape file, which is reflecting Area in miles. With this image, I have given the 0 value (the background) a transparency of 50% so that all the islands are visible.
- You can run this from the command line.
- The raster is created using the CRS of the vector file.
- This generates a greyscale image. There are a few plugins that will allow you to colour your greyscale image.
- A way to geographically understand the resolution was provided on the [user mailinglist.]