Related Plugins and Tags

QGIS Planet

Raster Data Extraction using QIS

Raster files consist of a grid of cells, each cell contains a numeric value, which is used to determine how to colour each cell.  This value may be based on the elevation of the cell, flood water depth, or soil quality. It is possible to extract this information by point sampling or using a terrain profile. Point sampling copies the cell’s value to the overlying point. A terrain profile tool plots a graph with the cell’s value (elevation) on the Y axis and the distance along the section on the X axis.

Point Sampling Tool

DEM’s are often used to then update the elevation values of overlying points, for example I have used data from DEM’s to update the elevation values of address points and utilities. This isn’t as accurate as surveying each point, but it is a lot quicker! This process is also referred to image extraction, raster/vector conversion.

For this tutorial, you will need:-

  • The Point Sampling tool in QGIS is an optional plugin. You can download it by using the menus to select Plugins, Fetch Python Plugins.
  • Nasa’s srtm data, which you can download from here: http://srtm.csi.cgiar.org/
  • Some point data. If you can’t think of any, then they’re easy to create, for example use the Open Layers plugin to load Open Streetmap or Google Maps of your area, and then create points over a few cities.

I’m going to add the elevation value from the srtm rasters to a selection of UK towns and cities:-

Raster Data Extraction - UK srtm

  1. Use the menus to select Plugins, Analyses, Point Sampling Tool
  2. The Point Sampling Tool dialogue box opens. Select:-
  • The layer that contains the points to be sampled
  • The layer(s) with the field(s)/band(s) to get values from
  • The output (results) file
  • Press OK

Raster Data Extraction - Point sampling tool

The results file just contains the elevations:-

Raster Data Extraction - Elevations

It is possible to add these to the original layer:-

  • Create a buffer around the new points
  • Use the menus to select Vector, Data Management Tools, Join Attributes By location
  • Select the original points as the target and the buffer as the join layer

Another option is to update the x and y co-ordinates for both points using the Field calculator and then to match the rows in Excel on the co-ordinate column.


Editing Vector Features in QGIS

Editing Features

A lot of of GIS work involves editing polygons and polylines as well as calculating the size of any overlapping features. For example when I provided GIS support to a local authority’s planning team, I was regularly asked to calculate what proportion of proposed developments overlapped constraints such as flood zones.

In this tutorial, I first look at the re-shaping features on the Advanced Digitising Toolbar. Then I will go through geo-processing tools such as buffer, union, intersect etc.

Advanced Digitising Tools

QGIS Advanced Digitising Toolbar

QGIS Advanced Digitising Toolbar


From left to right, the tools are:

  • Undo
  • Redo
  • Simplify feature
  • Add ring
  • Add part
  • Delete ring
  • Delete part
  • Reshape features
  • Merge selected features
  • Merge attributes of selected features

To use any of the tools,

  • Begin an edit session, by right click on the layer’s name in the Layer Panel and select toggle editing.
  • Select the feature that you wish to edit
  • Select the tool

This is the polygon at the start of the edit session, I will show a screen shot of each result:

Polygon in QGIS

Polygon in QGIS

Add Ring

is used to subtract a new internal region from the existing polygon. Select the tool and then draw the desired internal polygon:-

Add Ring in QGIS

Add Ring in QGIS

Delete Ring

deletes the selected internal region. Select the tool, and then click on the internal region’s nodes.

Add Part

adds a new external region to the existing region. Select the tool, then draw the new region, ensure it snaps to the existing region:-

Add Part in QGIS

Add Part in QGIS

Delete Part

deletes the selected region. Select the tool, and then click on the region’s nodes.

Reshape Features

draws a temporary region which is then subtracted from the existing region:

Reshape Features in QGIS

Reshape Features in QGIS

Reshape Features in QGIS

Reshape Features in QGIS

Split Features

draws a line through the region. The region is then split along the line

Split Features in QGIS

Split Features in QGIS

Merge Features – merges two or more selected features. Note Ctrl+click is used to select multiple features

Merge Features in QGIS

Merge Features in QGIS

A dialogue box allows you to choose which attributes to keep, discard. It is also possible to carry out mathematical operations such as sum, maximum on numeric fields and to concatenate text fields:-

Attributes in QGIS

Attributes in QGIS


  • Page 1 of 1 ( 2 posts )
  • points

Back to Top

Sustaining Members