Quick and easy to create Map –  Learn basics about the QGIS

Quick and easy to create Map – Learn basics about the QGIS

[vc_row layout=”normal” margintop=”0″ marginbottom=”15″ paddingtop=”0″ paddingbottom=”0″ bg_color=”#ffffff” bg_repeat=”repeat” bg_stretch=”no” en_border=”no” border_color=”#e8e8e8″][vc_column width=”1/1″][vc_column_text]Table of Contents:

1. QGIS installation

2. QGIS Interface

3. Setting up Spatial Reference System

4. Adding vector data, shape files

5. Moving around map and map canvas

6. Layer management

6.1 Layer Function

 6.2 Attribute table

7. Layer properties

7.1 General

7.2 Symbol

 7.3 Labeling

7.4 Other properties

8. Preparing vector data: creating, editing and deleting shape files

8.1 Creating new shape Files

8.2 Editing shape files

8.3 Snapping

8.4 Adding X and Y coordinates to QGIS

9. Geographical Analysis

9.1 Spatial query

9.2 Geo-processing tools

9.3 Convex hull(s)

9.4 Clip

9.5 Buffer

10. Georeference

11. Map composition[/vc_column_text][vc_separator style=”double” padding_top=”0″ padding_bottom=”0″][/vc_column][/vc_row][vc_row layout=”normal” margintop=”0″ marginbottom=”15″ paddingtop=”0″ paddingbottom=”0″ bg_color=”#ffffff” bg_repeat=”repeat” bg_stretch=”no” en_border=”no” border_color=”#e8e8e8″][vc_column width=”1/1″][vc_column_text]1. QGIS installation

QGIS software can be downloaded from https://www.qgis.org/en/site/forusers/download.html .

QGIS installation
User can download the appropriate version. In this tutorial, we installed QGIS version 2.8 (64 bit) for the windows.

QGIS Setup

QGIS installation process window
Click Finish at the end.[/vc_column_text][vc_separator style=”double” padding_top=”0″ padding_bottom=”0″][/vc_column][/vc_row][vc_row layout=”normal” margintop=”0″ marginbottom=”15″ paddingtop=”0″ paddingbottom=”0″ bg_color=”#ffffff” bg_repeat=”repeat” bg_stretch=”no” en_border=”no” border_color=”#e8e8e8″][vc_column width=”1/1″][vc_column_text]
2. QGIS Interface
Now you will notice QGIS and other open source software icons are on the desktop.

QGIS Interface
Click QGIS Desktop icon to open QGIS interface.

QGIS Desktop
There are so many useful tools in the QGIS. Basic tools are already presen int the QGIS interface. If you need more tools then right click on the Menu bar and choose available tools.

 Basic tools
All toolbar icons have small description if you hover the mouse cursor over it for a moment. This makes it easier to become familiar with the different options and tools in the QGIS.
Some window also contain a help button (normally in the bottom left) which can sometimes provide helpful tips and information.[/vc_column_text][vc_separator style=”double” padding_top=”0″ padding_bottom=”0″][/vc_column][/vc_row][vc_row layout=”normal” margintop=”0″ marginbottom=”15″ paddingtop=”0″ paddingbottom=”0″ bg_color=”#ffffff” bg_repeat=”repeat” bg_stretch=”no” en_border=”no” border_color=”#e8e8e8″][vc_column width=”1/1″][vc_column_text]
3. Setting up Spatial Reference System

It is best practice to define the coordinate system or projection system before you start any work.

a- Setting in main menu bar

b- Option > CRS

Spatial Reference System Option

c- Then press  button, new window will popup where you have to select required CRS system.

CRS system selector window[/vc_column_text][vc_separator style=”double” padding_top=”0″ padding_bottom=”0″][/vc_column][/vc_row][vc_row layout=”normal” margintop=”0″ marginbottom=”15″ paddingtop=”0″ paddingbottom=”0″ bg_color=”#ffffff” bg_repeat=”repeat” bg_stretch=”no” en_border=”no” border_color=”#e8e8e8″][vc_column width=”1/1″][vc_column_text]
4. Adding vector data: shp files

Vector data is composed of discrete coordinates that can be used as points or connected to create lines and polygons.
There are several ways to add existing vector data to the project.

a- Go to the layer in main menu barMenu bar add layer

b- Select add layer

c- Click on add vector layer

 

 

Another way is from Manage layer tool box
add vector layer button
In Manage Layer tool bar click on Add vector Layer button.

Another way is from the browser tool box,
browser tool box

Browse the shape file location and double click it to add.
In all above process user has to browse the shape file location and choose file_name.shp file.

add vector layer window
Note: If shape file doesn’t have CRS, then QGIS prompt CRS selection window.[/vc_column_text][vc_separator style=”double” padding_top=”0″ padding_bottom=”0″][/vc_column][/vc_row][vc_row layout=”normal” margintop=”0″ marginbottom=”15″ paddingtop=”0″ paddingbottom=”0″ bg_color=”#ffffff” bg_repeat=”repeat” bg_stretch=”no” en_border=”no” border_color=”#e8e8e8″][vc_column width=”1/1″][vc_column_text]
5. Moving around Map and Map Canvas

Map navigation toolbox helps to explore map.
map navigation window

From left to right

 pan map grab the map and move it about
 pan map to selection This tool bring the selected part in the center of screen
 zoom in Zooming to the interested area
 zoom out Zooming out from the zoomed area
 zoom actual size This is basically for Raster data zooming into pixel size
 zoom full This will bring all map layer in screen extend
 zoom to selection It will zoom the selected part
 zoom to layer It will zoom selected layer to screen extend
 zoom last return to the last map canvas position
 zoom next go to the next canvas position
 refresh reload the map canvas (good if it gets stuck or does not display correctly first time)
 identify features It will show the information of clicked feature.

To use the tool, Select the right tool and apply to the map canvas. User need to play with this tools to get familiar with it.[/vc_column_text][vc_separator style=”double” padding_top=”0″ padding_bottom=”0″][/vc_column][/vc_row][vc_row layout=”normal” margintop=”0″ marginbottom=”15″ paddingtop=”0″ paddingbottom=”0″ bg_color=”#ffffff” bg_repeat=”repeat” bg_stretch=”no” en_border=”no” border_color=”#e8e8e8″][vc_column width=”1/1″][vc_column_text]
6. Layer Management

Where the added data goes?

All your added data goes to the Layers toolbar. Layer toolbox is one of the vital component of the QGIS where you can play with your data.

Layer Management
While working with many layers, it should be in right order to visualize data properly. User can drag the layer and move its current position. In the below example, street is move upward.  Basic thump of rule is in layers toolbox, a polygon layer should be at the bottom, after that polyline and at the top should be the point file.

Layers window[/vc_column_text][vc_separator style=”double” padding_top=”0″ padding_bottom=”0″][/vc_column][/vc_row][vc_row layout=”normal” margintop=”0″ marginbottom=”15″ paddingtop=”0″ paddingbottom=”0″ bg_color=”#ffffff” bg_repeat=”repeat” bg_stretch=”no” en_border=”no” border_color=”#e8e8e8″][vc_column width=”1/1″][vc_column_text]
6.1 Layer Function
There are several layer functions. To display the layer function, select a desire layer and then right click.

Layer Function

The function are

: A useful way of examining a study area is to zoom to a layer’s extent in the display. This method is a quick and easy way of zooming in to the area of concern.

: The Overview window uses a box to show the extent of your display view within the total extent of your data. You can use the Overview window to navigate the map in the Data view display.

overview window
The red box is the extend of the current map display in the map canvas.

: It will remove selected layer from the Layers toolbox.

: It will create a copy of selected layer in the Layers toolbox.

:  As name suggested, it sets the minimum and maximum scale to visualize in the map canvas.

scale visibility layers

: Feature count will show the number of feature on the selected layer as shown in the figure.

layers[/vc_column_text][vc_separator style=”double” padding_top=”0″ padding_bottom=”0″][/vc_column][/vc_row][vc_row layout=”normal” margintop=”0″ marginbottom=”15″ paddingtop=”0″ paddingbottom=”0″ bg_color=”#ffffff” bg_repeat=”repeat” bg_stretch=”no” en_border=”no” border_color=”#e8e8e8″][vc_column width=”1/1″][vc_column_text]6.2 Attribute Table
To open the attribute table of the selected layer, right click and 

attribute table

In the attribute table there are many functions and some of them are explain below

Editing mode: This function allow you to modify or update the attribute table.

attribute table editing mode

attribute table

attribute table adding info

Save: This button save the edit or update. Editing mode should be on.

Delete: This will delete the selected row. Editing mode should be on.

Selection by Expression.

Deselecting

Move selected feature on the top.

Pan to the selected row.

Zoom to the selected row.

Copy the selected row.

Delete column. This will prompt a window with list of attribute name. By selecting attribute name and pressing OK button will delete the selected column.

delete column

Add Attribute Column

add attribute column

Field calculator:

field calculator

On the bottom of the Attribute table there are filters in the drop down menu as shown in the below figure.

Attribute table option[/vc_column_text][vc_separator style=”double” padding_top=”0″ padding_bottom=”0″][/vc_column][/vc_row][vc_row layout=”normal” margintop=”0″ marginbottom=”15″ paddingtop=”0″ paddingbottom=”0″ bg_color=”#ffffff” bg_repeat=”repeat” bg_stretch=”no” en_border=”no” border_color=”#e8e8e8″][vc_column width=”1/1″][vc_column_text]7. Layer Properties

To go to layer properties either double click the selected layer or right click and go to properties. A layer may have different properties some are explain here

7.1 General
The general properties show the information about layer such as layer name, layer source, CRS etc.

Layer Properties

7.2 Symbol

Symbol is the one of the important part for the map representation. Symbol distinguish one feature from another. To symbolize your map, right click on the selected layer then properties and then style. The below figure shows the changing of polygon fill color. This example is for a single symbol for all features.

Layer Properties symbol

Layer Properties symbol
There are many symbol style for representing different features in the same layer as shown in below figure.

Layer Properties graduated color

The below figure shows the categorized symbol according to regions of the world map.
Layer Properties graduated color code world map

Not only polygon can be symbolized differently but also point and line can be.
symbolize points

symbolize lines

7.3 Labeling
Labels can be added to the map to show information about an object. Any vector layer can have labels associated with it. These labels rely on the attribute data of the layer.

Labeling

Map composed of Symbols and Labels is the important part.

7.4 Other Properties
There are many other properties of the layer such as fields, rendering etc. User have to play with this properties to know more about layer properties.[/vc_column_text][vc_separator style=”double” padding_top=”0″ padding_bottom=”0″][/vc_column][/vc_row][vc_row layout=”normal” margintop=”0″ marginbottom=”15″ paddingtop=”0″ paddingbottom=”0″ bg_color=”#ffffff” bg_repeat=”repeat” bg_stretch=”no” en_border=”no” border_color=”#e8e8e8″][vc_column width=”1/1″][vc_column_text]8. Preparing vector data: creating, editing and deleting shp files:

While working with vector data some time we need to create it and/or edit existing data.

8.1 Creating New Shape File.
This helps to create new vector data for eg. Digitization from the image.  Shape file can be created by clicking

Alternately, Layers tab from main menu, Create Layer and then New Shape file Layer.
Creating New Shape File.

This will open a new window as below
New Vector Layer

Begin from the top, user have to first define shape file type i.e Point, Line or Polygon. Then define File encoding. After that user have to provide CRS for the new shape file. The newly created shape file might contain various attributes, this can be define in the section New Attribute. Finishing everything and clicking OK button will show up new windows where you have to give the name of the vector layer and the destination to save it.

8.2 Editing Shape Files.
After creating it, you can edit the shape file, either by right clicking the layer and ‘toggle editing’ or highlighting the layer and choosing the ‘edit’ button in the digitize toolbar (see below).

Editing Shapefile

Editing Shapefile

When edit button pressed, the pencil sign shows up on the layer that is editable.

You can then edit the shape file –if you want to add to the shape file (either more points, more lines or more polygons) you click the ‘add feature’ button next to the save button on the above toolbar.

You can also move it and delete parts using the tools on this toolbar.

To save your edits right click once you are done and click OK on the window that pops up. You can then toggle editing off. It will prompt you to save changes if necessary.

8.3 Snapping:

The vector files you create can snap or join to other shapes files –this can be useful if you are trying to create a complete shape or tracing a feature directly.

>To set the snapping options first go to Settings/Snapping Option.

snapping options

You will get the Snapping option windows
snapping option window

You can change the snapping mode. The snapping mode define the in which layer includes in snapping.

snapping mode

Set the snapping tolerance to pixels or map unit –Choose a tolerance suitable for the work (5 is a good starting point).

User might also enable snapping for topological editing and/or intersection at the bottom of snapping option window.

8.4 Adding X and Y Coordinates to QGIS:

Sometime user might have a set of x, y coordinates and other data tables from survey. This data need to be added into the QGIS for further analysis. To do so, if the data table is in csv format is the best. This can be achieved in Excel, by saving as .csv (Comma Delimited).

The csv file can be added as

>Click the layer in main menu then add layer and add delimited text layer

>Browse for the table

>Name the layer

>Choose the file format, if you have other *.txt with different delimiters then choose custom delimiters and Specify the delimiter string –such comma ‘,’, semicolon ‘;’ etc.

>X field is your Easting column, Y field is your Northing column if they are coordinates related entries. Finally you got your x, y coordinates and other data in QGIS.[/vc_column_text][vc_separator style=”double” padding_top=”0″ padding_bottom=”0″][/vc_column][/vc_row][vc_row layout=”normal” margintop=”0″ marginbottom=”15″ paddingtop=”0″ paddingbottom=”0″ bg_color=”#ffffff” bg_repeat=”repeat” bg_stretch=”no” en_border=”no” border_color=”#e8e8e8″][vc_column width=”1/1″][vc_column_text]9. Geographical Analysis

9.1 Spatial Query
For example purpose, street network from somewhere around the world is taken.

Spatial Query

Then a polygon mask is digitize as mentioned on the above process

> Create new shape file

>Toggle Editing

>Add feature (Draw or digitize polygon)

>Save and exit edit mode.

>Make fill color as transparent

Spatial Query

Spatial Query

You will get following windows

Spatial Query option

In this windows, user have to define

a. Source feature in which selection has to be made

b. Spatial Condition for selection such as Spatial Query intersects

c. Then user has to define the reference feature for selection

d. Then press on apply button that gives results as below

Spatial Query results

Create layer of selected feature press  button and you will see one more layer name + selected. In this example streets is selected so streets selected is added.

layers window

The added layer streets selected is temporary so user have to save it for permanency by right clicking and then go to save as.

9.2 Geo-Processing tools
While working with vector data, data has to be processed to get the desired result. For this purpose QGIS provides many Geo-processing tools under vector menu in main menu bar.

Geo-Processing tools

9.3 Convex  hull(s)
The Convex hull tool derive the mask of the layer data in new shapefile.

convex hulls

In the following figure the back ground polygon is the convex hull generated for the street network shape file.

polygon

9.4 Clip

Sometimes with larger datasets, it is useful to extract the small area for the region you are working on. This can be done by creating a new shp file –polygon. Drawing a polygon over the area you want to extract then choosing the clip function in the Vector tools menu. The example is same as the spatial query.

9.5 Buffer

Buffering usually creates two areas: one area that is within a specified distance to select real world features and the other area that is beyond. The area that is within the specified distance is called the buffer zone.

buffer zone is any area that serves the purpose of keeping real world features distant from one another. Buffer zones are often set up to protect the environment, protect residential and commercial zones from industrial accidents or natural disasters, or to prevent violence. Common types of buffer zones may be greenbelts between residential and commercial areas, border zones between countries, noise protection zones around airports, pollution protection zones along rivers or the right of way of road.

buffer zone from points

buffer zone from lines

Generally buffer creates a polygon file.[/vc_column_text][vc_separator style=”double” padding_top=”0″ padding_bottom=”0″][/vc_column][/vc_row][vc_row layout=”normal” margintop=”0″ marginbottom=”15″ paddingtop=”0″ paddingbottom=”0″ bg_color=”#ffffff” bg_repeat=”repeat” bg_stretch=”no” en_border=”no” border_color=”#e8e8e8″][vc_column width=”1/1″][vc_column_text]10. Georefrence

QGIS supports various kinds of raster data and Imagery such as *.tiff, *.ecw, *.jpeg etc. Most of the time these raster data need to be geo-reference to its actual ground position. Sometime Raster images comes with location data –for example tiffs accompanied with .tfw files. These files should be kept together in the same folder. When the tiff image is added into QGIS, it should drop into the correct location (assuming all projections are correct) and if it does not then we have to do Geo-referencing.

There are several ways to go Geo-referencing in QGIS. One of them is

Georefrence window

Main Menu>> Raster>> Georeferencer

Which open a new window

Add the raster you want to georeferenced by clicking the ‘Add raster layer’ icon in the window that pops up. Geo-referencing can take place using control points –i.e. points that the image and the actual location on the map are in common. These can be derived from features marked on the map that correspond to known features on the image. Or survey data from a GPS or Total Station marking the corners of grids or field boundaries. The important thing is to have control points decided in advance of starting this process, depending on the number of control points that are suitable this will influence the transformation type you select (more detail on this below).

Georefrence winodw

Add the raster you want to georeferenced by clicking the ‘Add raster layer’ icon 

in the window that pops up.

>Click the ‘add control points’ icon 

Then click on the first control point on the raster image you want to locate –a window pops up.

Georefrence control points

There is the second option of determining this corresponding point by clicking on the map canvas –follow the onscreen instructions and click the pencil icon labelled ‘From map canvas’. Then make sure to zoom in as close to this point on the map as possible and click on this point. (toggling between zoom function in main QGIS window and the second georeferencing window –it often reduces to the bottom left corner of the screen)

>Click OK and the first point appears in the panel below the raster.

>Repeat this for the rest of your control points –if you make a mistake at any point you can delete the control point and start it again or move the control point to the correct position using the icons on the georeferencing window toolbar.

Click the green triangle icon for ‘start georeferencing’ and a window pops up asking you to set the transformation type –click OK.

Transformation settings

>Transformation Type drop down menu gives you a choice –linear requires 2 control points, polynomials require more depending on the degrees of transformation.

(Generally it is better where possible to go for polynomial transformation in terms of increased accuracy.)

>Leave resampling method and Compression on their defaults (see figure below).

>Choose a location and name for the output raster (clicking the browse button to the left of this field)

>There is the option to check a box to create a world (.wld) file –this saves the locational data and can be kept with the original raster to use as location data in future projects.

>Check the ‘load in QGIS when done’ box to display the located layer

You can also save your georeferencing control points (GCP) using the save icon in this window –this could be useful if you want to try different transformation types before deciding on the most useful one.[/vc_column_text][vc_separator style=”double” padding_top=”0″ padding_bottom=”0″][/vc_column][/vc_row][vc_row layout=”normal” margintop=”0″ marginbottom=”15″ paddingtop=”0″ paddingbottom=”0″ bg_color=”#ffffff” bg_repeat=”repeat” bg_stretch=”no” en_border=”no” border_color=”#e8e8e8″][vc_column width=”1/1″][vc_column_text]11. Map Composition
To compose map, go to project and new composer or press   new composer icon. It will show up composer title. Provide the composer title.

composer title

After pressing OK button, new window will popup.
new window composer

In composer interface, there are many buttons. If you hover over the button you can see the tool-tip providing info about it. Some of the buttons are explain here.

 Add new map: This button add the QGIS canvas (the map that we want to present) to our composer.

 Add image: to add image

 Add new label: This button help to provide information about generated map such as Title, Author, and Date etc.

 Add new Legend: This button bring the symbol from the map canvas.

 Add new scale: This button provide the map scale.

 Add new arrow: This button help to show north arrow in map.

 Add new attribute: This will add the desired attribute table of available layer. This help to show statistics data on map.

 This buttons help to print map either in hard-copy or in image or in pdf as per user needs.

To compose map, first click Add new map, then draw rectangle box in working space. Note that this is your main map so present. The added map can be seen in items toolbar and its properties can be edited as per needed.

world map output[/vc_column_text][vc_separator style=”double” padding_top=”0″ padding_bottom=”0″][/vc_column][/vc_row]

This Post Has 5 Comments

  1. Can I translate this guide to the Portuguese? It would be of great help to the QGIS users here in Brazil.
    I follow your site and Facebook page, always has great tips on QGIS and Remote Sensing, has been very helpful.
    I am responsible for the translation of the GUI of QGIS for Portuguese of Brazil.
    Kept all credits to the author, of course.
    Greetings from Brazil.

    1. Thank you for your comment, I will send you an email.

    2. Sure, I am fine with that. But please give us a credit that link back to this tutorial. I appreciate what you guys are doing and say HI from me to the Brazil people.
      Thank You,
      PM

  2. Thank you for responding, I await your email so I can include your name together with the link to the post on your site, in translation.
    Follows another e-mail address in case of previous address present problems:
    sidney.goveia@usp.br

  3. I have move a lot of points and i want the new positions (X, Y) coordinates to be updated in the attribute table. Please i need help . Thanks

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Menu