Skip to main content

Introductory Training On QGIS


What is QGIS?

QGIS (previously known as Quantum GIS) is open-source desktop geographic information system (GIS) application that provides data viewing, editing, and analysis.
Similar to other software GIS systems, QGIS allows users to create maps with many layers using different map projections. QGIS allows maps to be composed of raster or vector layers.
Typical for this kind of software, the vector data is stored as either point, line, or polygon-feature. Different kinds of raster images are supported, and the software can perform image georeferencing, spatial data analysis along with support of various remote sensing tools and models. 

Training Contents
-              Getting Started with QGIS
-              QGIS Plugins
-              Adding and Modifying Vector Layers
-              Viewing data and Vector Attributes
-              Saving your QGIS Projects
-              Using Plugins
-              Adding Raster Images
-              Creating a Map with Print Composer

Software
-              QGIS

Data Set
-              CA_projected.shp
-              CA_Cities_Top10.shp
-              Yosemite_boundary.shp

Image by Mojca JJ from Pixabay
Getting Started with QGIS

             Open QGIS
Mac: from your Desktop icon or your Applications folder. 
Windows: from your Desktop icon or your Program start.

The QGIS interface has multiple elements outlined here, Take a look at each of the elements:

1.   Layers List/Browser Panel

This will display all the layers you have in the map. You can right click on each layer file for more information and to perform specific functions. You can also expand and collapse items within the panel

2.   Toolbars
The tools you use most often can be displayed here. You can modify which tools are displayed by click on “View­‐> “Toolbars”. You can also move tools around within this toolbar

3.   Map Canvas (where map is displayed)

4.   Status Bar
This shows current information about the map and allows you to adjust the scale.

5. Here you can add in different types of data layers. Note: if you hover over any of these icons, it will display the function name. Explore the available functions.

See the figure next

Image taken from QGIS Desktop version 

QGIS Plugins

Plugins are optional tools that you can import into your QGIS for additional functionality. A useful plugin for QGIS is Open Layers and includes Google Maps, OpenStreetmap and Yahoo Map layers.

  From the Plugins menu in QGIS, choose Manage and Install Plugins enter Open layers in the search field and select Open Layers Plugin from the list.

 
OpenLayers Plugin
OpenLayers Plugin 
Click the Install plugin button. This will download the plugin from the repository, install it, and load it into QGIS.


Install the Semi-Automatic Classification Plugin. This is a useful plugin for many types of raster operations such as classifications.

Press OK for Welcome Screen 



 Adding and Modifying Vector Layers
 Click on the Add Vector Layer icon 
Add Vector layer icon 
 A screen as shown below appears

Add Vector Layer Dialogue 


Next to Data set click on the Browse button and find the Shapefile called CA_projected.shp. Click Open to add it to the map. The layer will be added to the map and you should see an outline of the state of California. The color may not be aesthetically pleasing, so we can change that.


Added File 
Right click on the CA_projected file in the Layers Panel, then click on Properties. This should automatically take you to the Style panel and there you can change the color, transparency, etc. Click Apply at the bottom. You will see the fill change colors. Click OK.


Layer Styling 



















Repeat the previous steps to add the CA_Cities_Top10.shp and Yosemite_boundary.shp files. These are a point file of the ten largest cities in California based on population, and the boundary of Yosemite National Park.

Right click on the CA_Cities_Top10 file in the Layers Panel, then click on Properties. In the Style tab, change the symbol to the city option in the box on the right. Then, using the drop-down menu next to Color, change the fill color to blue.

You can also add labels to a map and modify them based on your specific cartographic needs. Click on the Labels tab. In the top drop down menu choose Show Labels for this Layer. In the drop down menu next to Label With select NAMELSAD. Click Apply.
Image Changing Labels 
Without closing the Properties box, take a look at the city labels in the map.
You can also change the formatting of the labels. Click on the Buffer option within the Labels tab.
Check the Draw text buffer button and keep everything as default. Click on the Shadow option and check the Draw drop shadow. Finally, click on the Placement option and increase the distance to 1 millimeter by clicking on the “up” arrow next to Distance. Click Apply again and close the Properties window. Take a look at the labels again in the map. They are now a bit easier to read.

Image Editing Label Properties 
You can also modify and label the Yosemite layer in the same way. Open the Properties box and change the color to dark green. Click on Simple Fill in the fill box on the left side. Then change the Fill color to green and the Boarder to red.

Label the layer using the UNIT_NAME and give it a white Buffer of 0.7 millimeters.

Viewing Data & Vector Attributes
Using some of the tools on the top of your QGIS project panel, you can modify the view of your data. Click on the Zoom Full  tool. This should display the full extent of all of your map layers. You can also zoom into specific layers. Click on the Yosemite_boundary layer, then click on the Zoom to Layer tool. This should allow you to view the full extent of the Yosemite NPS boundary. You can also zoom to a specific layer by right clicking on the layer in the Layers Panel and clicking on Zoom to Layer.
Zooming Tool 

You can also obtain more information about the specifics of a vector layer by taking a look at the Attribute table.
Right click on the CA_Cities_Top10 layer and click on Open Attribute Table. Here you will see the latitude and longitude of each point, the state, and the city name.
Adding Attribute Layer

Saving your QGIS Projects

It is also very important to save your QGIS projects along the way so that you do not loose any important processing steps. At the top of your screen click on Project, then Save As. Navigate to your data folder for this training and save the project.

Using Plugins

You can also add some background imagery to your map using the Open Layers Plugin. At the top of your screen click on Web, then Open Layers Plugin, then Google Maps, and Google Satellite. It may take some time to load in your map, so be patient! Then zoom to your CA_Projected layer.
 
Adding Plugin
The above and below figure explains the steps

Move the Google Satellite layer to the bottom of the Layers Panel by clicking on Google Satellite and dragging it down below the other layers.

You can then adjust the transparency of the California layer. Right click on the CA_Projected layer and go to Properties. In the Style tab under Layer rendering you can adjust the Layer transparency by sliding the circle to the right or typing in a specific transparency on the box on the right. Adjust the transparency to 40. Click Apply then click OK. Now you can see some of the earth features under the California layer.
As you may have noticed, the Google Satellite layer causes QGIS to run quite slow and can sometimes cause it to freeze. Here is where that regular saving comes in handy! So if you are creating a map it is recommended that you add this layer at the very end of your work. Right click on the Google Satellite layer and click on Remove
   
Adding Raster Images

Click on Add Raster Button
Browse to Calaveras Image in data directory
Select Open


Right click newly added Calaveras layer and select properties
Explore number of bands and other options in properties tab

  Creating a Map with Print Composer 
The Print Composer function allows you to create a map as a PDF or an image file. You can add all the “pieces” of a map such as adding a legend, scale bar, north arrow, etc. Once you create your first map, you can also save the map template for quick map-­‐making in the future. Let’s briefly explore this tool.

Turn off the raster layer by unchecking the layer in the Layers Panel.

At the top of your screen click on Web, then OpenLayers Plugin, then Google Maps, and Google Satellite. It may take some time to load in your map, so be patient! Then zoom to your CA_Projected layer.

Map Composer 

At the top of your screen, click on Project, then New Print Composer. In the name prompt, type Map.



A new window will appear. Under Page size on the right side, change the
Orientation to Portrait.



On the left hand side of the Print Composer, click on Add new map .
Then hover over the blank page and draw a rectangle about the size of your
Page. This will automatically display your project properties within the new map.
If California is not centered, click on Move item content . Then click on the map to move around the contents.
Print Composer 

Click on Add scale bar.
Then click on the lower left side of the map. The scale bar will automatically be displayed. On the right side panel click on Item properties as shown in figure below.

 You can then check out all the other features of the Print Composer. You can style your maps to fit your cartographic needs. To end this homework we will save the map as a pdf.

At the top of your screen, click on Composer, then Export As PDF.
Exporting Map


A screen may pop up saying that it is recommended to print as raster, if so, click OK. This will still have the map as a PDF. Navigate to your webinar folder, name your map Week 1 Map, and click Save. You can then open this file and take a look at the map you created.

Comments

Popular posts from this blog

GDAL & OGR (Importance & Installation)

GDAL & OGR libraries allow you to perform various GIS operations like, Flow Direction or working with DEM few raster & vector analysis outside GIS environment. Image by  Gerd Altmann  from  Pixabay   What Knowledge one should have :  Basic Programming, Python What software you need : Python IDLE or command line, GDAL libraries files (explained later) Installation : 1- Once you have Python installed. 2- Start python IDLE to check which version of python you are using available at top as shown        Python IDLE 3- Install two files available at link below based on your version of python. Download  Link :  http://www.gisinternals.com/query.html?content=filelist&file=release-1500-gdal-2-1-2-mapserver-7-0-2.zip Install first :  gdal-201-1500-core.msi  and then:   GDAL-2.1.2.win32-py2.7.msi * Note specify the path C:\Python27\ArcGIS10.3\Lib\site-packages\ for GDAL-2.1.2.win32-py3.2.msi as shown in figure for (ArcGIS lib installed in python) Pyth

“Rule Based Classification” using eCognition

Availability of high resolution satellite imagery leads to a growing number of change detection techniques and algorithms,  research is done using remote sensing and GIS. In this tutorial, we build on the classification category feature set by introducing neighborhood relationships and topological functions. Secondly, we use relative elevation values and fuzzy rules for the classification systems. This study demonstrates that the rule-based classifier is a significantly better approach than the classical per-pixel classifiers & object based NN method . Image Source: NASA  Methodology 1.    Open the eCognition software. 2.    Click on “create new project” option. 3.    Import the “Study area image” from the workspace. 4.    Assign weights to NIR band 5.    Click on the layers and rename each layer. Layer 1 as blue, layer 2 as green, and 3rd as red and 4th NIR. 6.   Go to “Process” option on the top toolbar and open “ process tree” All the operations in ec

Working With Raster Calculator In ArcMap

Raster Calculator extracts information from a Raster Image, based on user requirements. Image by James Osborne from Pixabay Working with Raster Calculator To explore the highest elevation areas in your DEM raster e.g. select Spatial Analyst Tools à Map Algebra   Raster Calculator Tool  Raster Calculator Double click on the layer e.g. in my case it is  DEM_Layer or any raster of your choice,   to enter this into the ‘ search ’ window. Click on the “ > ” symbol e.g. and select a number less than the maximum elevation . Query can change based on your criterion.  This arithmetic raster operation will select all cells with values above the defined threshold. In the example below a threshold of 500m was used.  A new layer appears on your map. The majority of the map has a 0 value representing false (values below the threshold), and the colored region has a value of 1 representing true ( eleva

Learning Object Based Classification Using eCognition

Object Based Classification Using eCognition tutorials by GIS HIVE . ImageSource:PixaBay   Lab 01 Performing Image Classification On High Resolution Data on Erdas Imagine Lab 02 Introduction to eCognition Basics Lab 03 Image Segmentation using eCognition Lab 04 Object Based Classification Using Standard NN eCognition Lab 05 Rule Based Classification using  eCognition GIS HIVE intends to promote Geo Spatial Sciences awareness, for that purpose GIS HIVE has launched Youtube Channel . Here you can explore various Geospatial tutorials.

What is Radiometric Resolution Of Satellite Image

Radiometric Resolution  is defined as magnitude of EM ( Electromagnetic Energy ) recorded by a sensor Units : Measured in Bits Formula: Each bit records an exponent Power of 2. 1 Bit= 2 2 Bit=4 4 Bit =16 8 Bit=255 digital values Note: 0 represents Black tone and maximum like 255 represents highest tone. image source  www.satimagingcorp.com 1 Bit will be Black & white 16 Bit will be colored 32 Bit will be more colored and will carry greater energy levels Higher Radiometric Resolution much variation in colors reflected. Image to left is of  higher radiometric resolution than that of Landsat below. image source: geoinfo.amu.edu.pl

Generating Contours From DEM In ArcMap

Contours are a useful way to visualize topography and to create a map that can be printed in black and white, or that mimics the standard USGS topo maps. Image by TheAndrasBarta from Pixabay What you need: DEM data of your Area. Extract your area from online freely  available   DEM and select  Spatial Analyst Tools -> Surface -> Contour.  Select the inputs as follows, with a 100m or 50m contour interval: since 10 m might take time. and click  OK. Contour tool in ArcMap Output may be some thing like depending on color scheme. Go to properties and label elevation values for a good visualization. Image source:  en.wikipedia.org

GeoDa Free GIS Software

What is GeoDa : GeoDa provides analysis of various data formats like  shapefile, GeoJSON, KML, SQLite and table format (CSV, XLS and DBF). Image by  Pexels  from  Pixabay   How it is related to GIS: It provides Geo-visualization, user can perform certain spatial analysis.  Good things about GeoDa:   GeoDa is an Open Source software,  Along with Spatial analysis, simpler & complex statistical data analysis performed in excel (charting, graphing ) can be performed in GeoDa.  Most suited for: It is most suitable for Students, Researchers. Downloadable link :  http://geoda.software.informer.com/1.8/  imagesource: GitHub

Climate Change Not Myth But Reality

Northern Areas of Pakistan are blessed with beauty, we often hear people quoting these beautiful areas as “Switzerland of Pakistan”, “Heaven on Earth”, but these words proved there reality when for the first time I visited Northern Pakistan. It is worth mentioning that Pakistan is dependent on frozen hydrological resources. Many rivers such as River Swat, Chitral, Gilgit, Hunza, Shigar, Shyok, Indus, Shingo, Astor, and Jhelum are fed by runoff generated by melting of SC of Northern areas. Image by Aqsa kamran from Pixabay Image by Abdullah Shakoor2 from Pixabay This runoff supports agriculture . Agriculture of Pakistan is largely dependent on the snow melting phenomenon. Anomalies witnessed in glaciers and their melting patterns will have massive impact on hydrological resources because the country’s 70% of fresh water depends upon these frozen hydrological resources in the high mountains of Himalaya and Hindu Ku

OBJECT-BASED BUILDINGS DETECTION & CHANGE ANALYSIS USING MULTI TEMPORAL HIGH RESOLUTION REMOTE SENSING DATA

With urbanization and urban sprawl, land-use and land-cover change studies became an area of keen interest for researchers. Cause of rapid urbanization is peoples’ responses to economic opportunities, and government policies. New housing societies and business model adopted overall globe has provided opportunities for new land uses . Image by  piviso  from  Pixabay   “Image Classification is the process of sorting pixels into a finite number of individual classes, categories of data based on their DN (Digital Number) values”.  With advent of modern high resolution era of satellite images, PIXEL based, Object based and many other machine learning algorithms have been developed. Currently the prospects of a new classification concept, Object-Based Classification , are being investigated. Recent studies have proven the accuracy of object-based classification over traditional classifiers. The object-based classification approach relies on basic principle to use other

How To View Satellite Image In ArcMap

Viewing Satellite Map in Arc Map " Are you  interested  to study satellite image, go to google and search for freely available online satellite images"  Image by  Daryl Govan  from  Pixabay   Download them, i have added tmrect.bil   named   imagery  here  Bands Added In ArcMap  Right Click tmrect.bil in ArcCatalog Select preview section and examine tmrect.bil What is tmrect: It is Landsat TM image with 5 bands . Right Click on tmrect and select properties All information of satellite image is available in Raster section. Explore tmrect.bil by expanding it you will see 5 bands in drop down Now Launch Arc Map Insert a new Data Frame by clicking on insert as shown Spatial Reference Dialogue  Now to Add Data Right Click Task Data Frame and click Add Data Select tmrect.bil a window “Unknown Spatial Reference” is displayed. Click  OK Arc map will display Raster Image as