Draw lines specifying length and angle

This function in QGIS allows for CAD-like drafting.

Go to View menu>Toolbars and show “Advanced Digitizing Panel”

advanced draw

Click the “Add feature” icon and click the start point on the map.

type the “d” key on your keyboard and enter the distance. press enter. This will set the distance.

type the “a” key on your keyboard and enter the angle. press enter. This will set the angle of the line.



How to make your text labels standout on an aerial photo map

text color black

When creating a map with an aerial photo as it’s base, it is important to make the text labels stand out as plain text can get easily drowned out by the background colors.

text color Yellow

Yellow is often an appropriate color when the aerial photo is mainly made up of darker colors.

text color buffer

However yellow may not be very visible on light colors like white. A text buffer can overcome this issue. In the example above, I have used yellow text with a black buffer but black text with light buffer is just as effective.

text color curved

When labeling curvy features such as rivers and roads it is better to curve the text so that it sits neatly along the feature. This function in QGIS is found in the placement option in the layer properties as shown below.

text placement qgis


These are some tips to make your aerial photography maps easier to read and interpret. If you have any comments please let me know below.

Make text standout in QGIS

To make text standout from other map features we can either add a rectangle background or a buffer behind the text.

plain text

To change the properties of the text labels, double click on the layer containing the text > Labels > Background>Draw Background as shown below.

background on text

background on text 2

Alternatively you can add a buffer around the text. This option reduces the amount of map features being covered by the text background.

Double click on the layer containing the text > Labels > Buffer>Draw Text Buffer as shown below.

buffer on  text

buffer on  text 2

These text backgrounds and buffers can be any color. It is ideal to choose a color which contrasts well with text color.

Search for an attribute in a table in QGIS

In this example we will be searching for a city in a cities layer. Open the table by clicking the ‘Open Attribute table’ icon shown below.

open table clip

Below the table click on ‘column filter’ > select the column you want to search through. In this case it is the column called ‘name’

column filter

Type in the name of the city you want to find and click apply. Your search can be case sensitive if desired.

search sydney clipped

In this case our search query came up with 2 results as shown below

search result clipped


Georefencing Image files in QGIS

In this example we will georeference a jpeg map of Australia.


To georeference this map we need some common points to reference the image to. I will use a country layer (shown below) to match points to locations on jpeg map.

just boundaries

Next start Georeferencing by going to the raster menu > Georeferencer

Open a raster by clicking the button shown below.

start georef

Once the raster has been opened click on a point on the image which can be easily located on the country boundaries layer

click on first point

A popup will showup. select “from map canvas” and find the same point in the country boundary layer.

first point entered

Click OK in the Georeferencer and the point will be added as shown above.

Click on a selection of points spread out over the area of interest like my example below.

digitized points

Once the points have been added, got to file menu >  start georeferencing

georeference settings

Specify the transformation settings like above. Use a Projective transformation type is the image needs to be rotated and re-sized. A “Linear” transformation could be used in this example as the image only needs to be re-sized and not rotated. For output raster choose a suitable file name and for Target SRS choose your projection system.


After you click OK the georeferenced image should display in your layers in the correct position.

Calculating slope from contours using buffers and creating a slope map

Here is a simple way of creating a slope map using contour data to create a vector polygon layer.

Below we have 50m contour data.

contours only

For example to calculate a slope of 10 degrees or greater using 50m contours we must calculate the maximum distance between contour lines that results in a 10 degree slope using a trigonometric equation.

10 degree slope

In this example the maximum distance is 284 meters between the 50m contour lines.

We then halve this distance to get 142 meters and use this value to buffer the contours. Do not dissolve the buffer results as we will need to find the intersects between the buffers.

contours buffered

Intersect the buffers to find the overlapping areas. The intersect tool in ArcGIS can be useful for this. These overlaps will signal the contours lines that have 10 degrees or more slope between them.

intersected buffers

These intersected slithers only represent part of the 10 degree slope as the 10 degree slope should in theory cover the entire width between the two contour lines and possibly beyond the contour lines depending on the width of the intersect.

Buffering these intersects using the 142m figure that was calculated previously will extend the slope areas to the nearest contour line and beyond depending on the steepness of the slope. Dissolving this final buffer will create a single feature representing the 10 degrees and above slope.

calculating slope from contours

To calculate slope intervals, you would follow the same process as above with progressively higher slopes while clipping out the lower slope layer with the higher layer until you reach the largest slope interval layer. 





How to create a population map of the US using QGIS

US population by country

You can create a map of the US showing the population intervals by county.

You can do this by using a free GIS desktop program called QGIS and free GIS data available on various websites.

Download the Census shapefile from the census.gov website here. It should be called ‘County_2010Census_DP1’.

Open the QGIS program and go to the ‘layer’ menu and select ‘add vector layer’. Navigate to the ‘County_2010Census_DP1’ zip file and add it to your map. Alternatively the zip file can be dragged and dropped into the map window. It should appear as below.


If you right click the layer item on the left and go to ‘open attribute table’ you will see the county names and various population figures in the table.


In the census zip file there is a file called ‘DP_TableDescriptions’ which explains the column headings of the tables.  The column called ‘DP0010001’ is the column containing total population figures. We will use this column to graduate the colors of the counties according to their population value.

Double click the layer ‘County_2010Census_DP1’ so the layer properties windows appears as shown below.


Change from single symbol to graduated and then below that select the column ‘DP0010001’. Under Mode change it to Quantile (equal count) and press OK. The map should look as shown below.


You can create a printable map, add a frame, legend, north point etc. by using the Print Composer in QGIS.

Go to the file menu and click “New Print Composer”

Give the composer a name such as ” US population”

print composer

go to the Layout menu and then “Add Map”. Click at the top left of the canvas and drag to the bottom right. The map should appear like below.

add map

To center and zoom into the map go to the Layout menu and then to “move content”. With this tool you will be able to drag the map to the center and zoom in with the mouse wheel. You can set the scale in the item properties on the right hand side.

set scale

Once you have centered the mainland of the US, you can add Alaska and Hawaii with the same process by going to the layout menu and then “add map”. This time the map windows willl be smaller for Alaska and Hawaii.

maps added

A Legend can be added by going to the layout menu and then “add legend”. A scale bar can also be added through the Layout menu. To export this map as an image file go to the composer menu and then “Export as image”. Your map should look like below.

with legend