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)

The Rasterize dialogue
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.

Notes:
  1. You can run this from the command line.
  2. The raster is created using the CRS of the vector file.
  3. This generates a greyscale image. There are a few plugins that will allow you to colour your greyscale image.
  4. A way to geographically understand the resolution was provided on the [user mailinglist.]

Rasterize.png - The Rasterize dialogue (27.5 kB) ramon ., 10/22/2012 03:48 am

RasterAlaska.tiff - A raster version of the alaska.shp file (13.4 kB) ramon ., 10/22/2012 03:48 am

RasterAlaska.png (22.5 kB) ramon ., 10/22/2012 03:51 am

RasterAlaska.png (16.1 kB) ramon ., 10/22/2012 03:53 am