ANINTRODUCTIONTOGIS


Convert raster to vector

For this tutorial, we will start from the raster of the surfaces exposed to the North created at the end of the tutorial on Digital Elevation Model. If you did not create this raster, it is available here.

We will now use this raster to determine the percentage of north-faced areas for a given municipality: Orcines.

For a first example of an analysis combining rasters and vectors, we will see how we can convert a raster to a vector, so we can then perform the analysis using only the geoprocessing tools for vectors.

1. Convert raster to vector

As converting a raster to a vector may be time consuming, we will first crop our raster to the borders of the municipality of Orcines.

Practise: Create a shapefile with only the borders of Orcines

You may then crop the raster of north-faced areas following these steps:

  • Raster > Extraction > Clip raster by mask layer

Figure 1 Crop north-faced raster


We may then convert this raster to a vector:

  • Raster > Conversion > Polygonize (Raster to Vector)

Figure 2 Polygonize raster


In this raster, the entities with a “1” in the DN column of the table of attributes are the entities facing north.

Practise: Make a choropleth highlighting north-facing areas


Figure 3 North-facing entities (black)


2. Computing the surface of north-faced areas

Following the workflow used in this previous tutorial, you may compute the area of each entity:

  • Open the table of attribute of the newly created vector;
  • Click on “Open field calculator”

Figure 4 Compute surface from the Field Calculator


You may then use the GroupStats extension to sum the area occupied by north and south areas, respectively.


Figure 5 Compute total areas with GroupStats