From the course: Advanced QGIS Analysis with AI and Machine Learning

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Vector to raster with QGIS

Vector to raster with QGIS

Many types of analysis requires the data to be all in raster. In order to do that, you need to convert some of your vector data to raster. Let's try one now. Under the 3_Raster_Analysis folder, there's a shapefile called CRIME_TYPES. Let's drag and drop that in. And what they are, they're polygons, little circles of areas that have a particular crime occurrence. If we open up the tables by right- click on that and open the attribute table, you can see that there's an id, a crimetype, and an associated number, it's a crimetypeid. So for example, Theft of a Motor Vehicle is 6, Theft from a Motor Vehicle's 5 and so on, Break And Enter being 1. If I want to convert these to raster, I have to rasterize these. So what I do is I go into my processing toolbox and type "rasterize". There it is. And basically all we want to do is Vector To Raster. So we double-click on that and it already picks the only input layer listed: CRIME_TYPES. Now, if we want to use a field for burn-in value, we do. We…

Contents