Skip to Main Content

GIS (Geographic Information Systems)

Start here for general GIS questions.

QGIS Tutorials

QGIS is a Free and Open Source Software (FOSS). The support for QGIS is volunteer-driven in which volunteers provide support including fixing bugs, providing software updates, creating documentation, and supporting the user community. The main advantage of using QGIS (other than it being FOSS)  is that it runs on multiple platforms; you can run QGIS on Windows, Linux, Unix, Mac OSX and Android. Information on how to install QGIS on Windows and Mac platforms can be found in the Software Installation Guide.

These tutorials are designed to get you up and running using QGIS for viewing data, editing data, performing spatial analysis, and making a map.


Online QGIS Learning Resources

Here are the various components of the QGIS Project window. These components include a toolbar which gives you access to the most commonly used functions in QGIS, while the data frame is the area where you can see your data. In the browser window, you can do a variety of related tasks such as data management and access. The layers window allows you to manage and display your map layers. When you add a layer or table, it appears in your layers window.  Finally, the projection button provides information about the the current projection and allows one to change the map projection.


Additional Resources



Accessing Data and Adding it to QGIS

This tutorial was created using QGIS 3.12. Instructions may vary slightly for different versions of QGIS.

There are several ways to access data within QGIS. This tutorial covers:

  • Adding data from your local machine
  • Adding data from a shared network drive
  • Adding a basemap
  • Adding a web service from a GIS server

 Adding Data from Your Local Machine

You can add data such as shapefiles and csv files to QGIS from your local machine. There are two ways in which you can add data from your local machine:

  • Using the QGIS Browser
  • Open Data Source Manager


Using the QGIS Browser
  1. In the QGIS Browser, Navigate to the folder which stores your GIS data. In this case, we will add  MO2018_County_Boundaries.shp, which is a shapefile. 

  2. Click on MO_2018_County_Boundaries.shp and drag it to the data frame or the Layers window. You will see that the shapefile has been added to the data frame and the Layers window.


Using the Data Source Manager
  1. Click the Open Data Source Manager button in the QGIS toolbar.

  2.  As with the first option, we will add MO_2018_County_Boundaries.shp. Click on Vector in the toolbar panel, press on .... navigate to the folder where your shapefile is located, and click Open.
  3. Click on Add, then Close. The shapefile will be added to your QGIS project.

Adding Data From a Shared Network Drive (gispublic)

This example uses the WashU Spatial Data Data Directory (also known as 'gispublic') as the network share. First a 'Folder Connection' must be made to 'gispublic.' See the GIS FAQ page for instructions on mapping a network drive to 'gispublic' and creating a folder connection. Since 'gispublic' is a mounted drive, it will not immediately show up in QGIS.  There are two ways in which you can add data from 'gispublic.' 

From the GIS Browser

  1. Right-click on /Volumes and select Open Directory. You will see the 'gispublic' mounted drive in the finder window. Let's add the St. Louis Neighborhoods shapefile to your QGIS project. 

  2. In the finder window, under gispublic, click on the GISdata folder > Missouri folder  > City_Neighborhoods folder. Click and drag Neighborhoods.shp to the Layers window or Data Frame window.



From the Open Source Data Manager

  1. Click on the Open Source Data Manager button located on the top left-hand side of the QGIS toolbar.

  2. We will add the same shapefile as above. Make sure that Vector tab is clicked on the sidebar and type /Volumes in the Vector Dataset(s) text box. Click on ... next to the Vector Dataset(s) text box. You will see gispublic displayed among the volumes.

  3. In the finder window, under gispublic, click on the GISdata folder > Missouri folder  > City_Neighborhoods folder. Click and drag Neighborhoods.shp to the Layers window or Data Frame window (see the image in the From the GIS Browser section as reference).


Adding a basemap

There are two ways to add basemaps in QGIS; either by XYZ Tiles or the QuickMapServices plug-in.


XYZ Tiles

In QGIS 3.12, you can access an OpenStreetMap basemap under XYZ Tiles in the browser window. To add the basemap to your project, click on OpenStreetMap and either drag it into the Layers or Data Frame window.

You can also add other basemaps to QGIS by connecting to a tile service. For example, let's add Stamen's terrain basemap. You can find the URLs of various basemaps at the data_sources directory of the QuickMapServices (QMS) GitHub repository and at the data_sources directory of the QMS contributed data sources repository. The URL for the basemap is found in metadata.ini under [tms]. The tile url for Stamen's terrain map is:{z}/{x}/{y}.png.

  1. Right-click on XYZ Tiles and click on New Connection.
  2. In the Connection Details text box, type Stamen's Terrain Basemap in the Name text box.
  3. In the URL text box, type (or paste):{z}/{x}/{y}.png
  4. Keep all the other settings the same and click OK.

  5. Now Stamen's Terrain Basemap has been added under XYZ Tiles.


  6. Drag Stamen's Terrain Basemap either to the Layers or the Data Frame window.


QuickMapServices Plug-In

You can also add different base maps to QGIS via the QuickMapServices plug-in.

  1. In the QGIS menu bar, go to Plugins > Manage and Install Plugins...
  2. Click on Not-installed on the side-panel and type QuickMapServices in the search box. QuickMapServices should show up. 
  3. Highlight QuickMapServices and click Install Plugin.
  4. Once the plugin is successfully installed, click on Installed in the side-panel. If QuickMapServices is not showing up, then type 
    it in the search box.
  5. Make sure that QuickMapServices is checked so it can be activated and click Close.
  6. A series of QuickMapServices buttons will now appear in the toolbar.

    ​Here is a summary of the buttons from left to right:
    1. MetaSearch button: One is able to search across various catalogs and data services for maps and one can also add a service to the list of catalogs/data services.
    2. QuickMapServices: You can add a basemap from most commonly used data sources such as OpenStreetMap, NASA, or LandSat.
    3. Search QMS: You can search across the collection of QMS basemaps.
  7. Let's add a layer through the QuickMapServices button. Click on QuickMapServices > NASA SEDAC Earthquake Hazard Distribution - Peak Ground Acceleration.
  8. The layer is added to the Data Frame and Layers windows.


Adding a Web Map Service from a GIS Server

The method of adding a Web Map Service (WMS) from a GIS server to QGIS depends on the web map service. This tutorial will cover adding an ArcGIS MapServer layer (proprietary server) and an open source web map service.

Adding data from ArcGIS MapServer

There are two ways in which you can add data from ArcGIS MapServer. We will be adding data from the Missouri Spatial Data Information Service (MSDIS). MSDIS offers online access to two foot resolution aerial images of Missouri, among other raster and vector data layers.

From the Layer Menu Bar
  1. Click on Layer > Add Layer > Add ArcGIS MapServer Layer.
  2. Click on New under Server Connections.
  3. Under Connection Details, type MSDIS  in the Name text box and under the URL put Click on OK.

  4. Click Connect. You will see a list of available layers.

  5. Let's add some imagery of St. Louis to our project. Click on the edge of the Title field and expand it to see the name of the datasets. Click on StLouisHistorialAerialPhotos and scroll down to StLouis_2016_SPE. Click Add.

  6. It make take some time to load, but the layer will eventually appear in the data frame.


Identifying Feature Data on a Map

GIS data provides a wealth of information beyond what you can see on the surface. For example, a county dataset can have various demographic,  economic, or descriptive information about each county feature. This additional information is called an attribute and is stored in the attribute table

If the layer is displayed, you can use the Identify Features button in the attributes toolbar to view the attribute information for a specific feature. 

Other than selecting each feature one by one with your mouse pointer, you can also identify one or more features by drawing a polygon over features of interest, using a freehand tool, or specifying a search radius.



Symbology: Editing Map Symbols and Visualization

You can change how layers are represented by adjusting the layer symbology. QGIS displays data using a default 'single symbol' setting such that all features in a given layer appear with the same color and outline. The user is also able to control the symbology of the map based on categories or quantities stored in the attribute table. Examples of applying symbology to features are:

  • Applying a color ramp that varies from light blue to dark blue on a county layer in which there are population counts in the attribute table. The lighter end of the color ramp could represent counties with a low population and the darker end of the color ramp could represent counties with higher populations.
  • Distinguishing different types of point features such as school, libraries, fire departments, and police departments, by applying a unique icon for each type of feature.
  • Distinguishing polylines that are rural roads, highways, and expressways through applying specific symbology.

Let's apply symbology to line, point, and polygon layers using data from the MSDIS data portal. For detailed information on how to to add data to your map, refer to the Adding Data to a Map tutorial. Add these layers from MSDIS to your project:

  1. MO_2019_Katy_Trail_shp: Under MSDIS_Data > Transportation > MO 2019 Katy Trail
  2. MO_2017_National_Register_Sites_shp: Under  Culture and Society > MO 2017 National Register Sites
  3. MO_2018_County_Boundaries_shp: Under  Boundries > MO 2018 County Boundaries

Check the Layers window and ensure that the MO_2018_County_Boundaries is the bottom-most layer, while MO_2017_National_Register_Sites is the top-most layer. MO_2019_Katy_Trail should be the layer in the middle. 


You can change the appearance of features in a layer by right-clicking on the layer > Properties > Symbology to open the Symbology window. The most commonly used symbology types (single symbol, categorized, and graduated) are demonstrated below.




Single Symbol Symbology

With single symbol symbology, all of the features in a layer will have the same appearance.  For a polygon layer, you can set the fill color, fill style and adjust the the stroke width or stroke style.  For points and line layers, you can change the color, size, opacity or apply a symbol template. 

Let's change the symbology of the MO_2019_Katy_Trail layer to a yellow line using this option.  Open the symbology of the layer and click on the down arrow in the Color option which is next to the current selected color.  Change the color by moving the tick on the color wheel or by clicking in the triangle.  Move the color wheel tick and triangle to the same position as you see below.  Change the width of the line to 1.0 and press OK.


You can also change the color and style of point and polygon layers and change the size of the points and the width of polygons borders.  In the symbology window, the points and lines are labeled as Marker and Fill respectively. Change the point symbology for MO_2017_National_Register_Sties to black with a size of 1.0 and change the polygon symbology to grey. Once you changing the symbology for each layer, it should look like the below image.



Categorized Symbology

As the name implies, categorized symbology is used to symbolize your data into categories and is best used for categorical data. For points, line, and polygon layers, you can designate symbolization based on an attribute field and apply a color ramp to the layer. Let's explore categorized symbology by categorizing the MO_2017_National_Register_Sites by whether the site is an architectural historical site or not.  Right-click on MO_2017_National_Register_Sites > Open Attribute Table. Scroll until you see the AS_ARCHIT field. The AS_ARCHIT field indicates whether a site is an architectural site. We will apply the symbology using this field.

To change the symbology of the points layer, right-click on MO_2017_National_Register > Properties > Symbology. At the top of the Symbology window, change the symbology from Single symbol to Categorized. In Value, scroll to AS_ARCHIT. Click on the button with the point in Symbol and change the Size to 3.0. Click on the Classify button on the bottom of the Symbology window. In the section that shows how each value is symbolized, un-check all others... so it can be hidden. Click Apply then OK


Your data frame should look similar as below. Note that the colors might be different. Also note that in the Layers window that the MO_2017_National_Register points layer shows the symbology based on category.


Graduated Symbology

Graduated symbology is best used for quantitative data, especially continuous or interval data. It is similar to categorized symbology for you can apply a color ramp to either a points, line, or polygon layer, but the main difference is that you can apply a specific mode to the data which breaks up the data in user-specified classes. The modes that are available to choose from are Equal Count (Quantile), Equal Interval, Logarithmic Scale, Natural Breaks (Jenks)Pretty Breaks, and Standard Deviation.  For demonstration purposes, let's symbolize the MO_2018_County_Boundaries by square mileage. Right-click on the MO_2018_County_Boundary layer > Open Attribute Table and scroll until you see the SQ_MILES field. We will apply the symbolization to this field. Close the attribute table. 


Right-click on MO_2018_County_Boundaries > Properties > Symbology. On the top of the Symbology window change the symbology from Single Symbol to Graduated. Choose the value to be SQ_MILES and choose Blues for the color ramp. Change the mode to Natural Breaks(Jenks) and click Classify. It is important to choose an appropriate classification scheme for your data.

Click on the Histogram tab and click Load Values. You would want to choose the appropriate classification scheme based on the distribution of your data. For more information on the various schemes, refer to this article. Once you are done symbolizing your data, click OK.
Your data frame should look similar to below. The points symbology was changed to better stand out against the coloring of the polygon layer.

Overview of Geographic Coordinate Systems (GCS) and Map Projections

Coordinate systems provide a basis for identifying locations on the earth's surface. Historically, many coordinate systems have been devised, with the oldest ones assuming a flat earth and later based on a perfect sphere. Today's geographic coordinate systems are now based on a cartographic spheroid (an ellipse rotated about its axis) to more closely represent the earth's true shape and surface. Additionally, map projection coordinate systems have been developed to determine how the curved surface of the earth is depicted on a flat map.

A modern Geographic Coordinate System uses latitude and longitude to describe a location. The coordinate system is based on an origin: the intersection of a chosen prime meridian and equator. The coordinate system can pinpoint exact locations, but are not necessarily ideal for computing units of measure since the distance represented by a degree of longitude changes depending on latitude (meridians are closer together farther from the equator, converging to a point at the poles). Additionally, the earth is not a perfect spheroid. The South Pole is actually closer to the equator than the North Pole, and elevations on the surface are varied. Because of these conditions, the center of a coordinate system based on a spheroid is slightly adjusted so that part of the spheroid lines up remarkably well with a portion of the earth's surface. This adjustment is different, depending on what region of the surface is being mapped, so many different datums are used throughout the world.

A second cartographic problem is that flat maps are used to portray an area that is, in reality, a curved surface. Because of this, a map projection has to be defined when drawing a map. Some common projections can be thought of as wrapping a cylinder of paper around the earth so that it is tangent at the equator, or perhaps attaching a plane sheet of paper to the earth at one single point. Numerous map projections have been created, but all map projections will include some distortion. However, different projections allocate the distortion to certain parts of the earth while minimizing it in another, so choosing an appropriate projection for a particular map is important. In GIS, specifying or defining the coordinate system and related information for a set of data is important in producing valid analysis results because inaccurate locations and measurements can diminish the accuracy of calculated values. GIS software usually includes extensive support for a wide variety of standard coordinate systems, and contains tools for conversions and reprojections between systems. See the Specifying Coordinate Systems or Reprojecting Data sections below for more information.

More coordinate system information is available through the built-­in ArcGIS documentation under the heading "Map Projections and Coordinate Systems", as well as in the following articles:

Specifying a Coordinate System

A coordinate system needs to be specified for geographic data so that a GIS can determine how it should be projected. All geographic data displayed on a flat plain will contain some error, so various coordinate systems are used to optimize the spatial manifestation of the data.

Sometimes, imported data will not have a known coordinate system attached. For example, you may download GIS raster data from a public website, but when loaded into GIS software the spatial reference is said to be unknown.  The website does not mention which coordinate system was used during data collection. For some vector data, you can easily see that the data is not projected when you add it to your QGIS project. Areas can appear distorted or border lines appear too straight. One example of this is the below image of an unprojected Missouri layer. 



These series of tutorials will be using this layer which is available from the MSDIS data portal
MO_2018_County_Boundaries_shp: Under  Boundries > MO 2018 County Boundaries

A layer that is projected will look like this in which the appearance reflects an area on a curved surface :



If the coordinate system for a dataset is unknown or incorrect, there are two ways you can assign correct coordinate system:

  • Specifying the projection on-the-fly using the EPSG button in the QGIS project window.
  • Exporting the layer into a new layer with a different projection.

On-The-Fly Projection using the EPSG Button

On-the-fly projection is when you change the projection of QGIS project but not the projection of the layer. Any subsequent layer added to the project will take the specified projection. While it is recommended to change the projections within the layer, on-the-fly projection is acceptable in such situations in which one might to take an initial look at all the layers but will not be performing any spatial analysis or creating a map of the layers but you want the layers to be viewed in a specific projection. You can change the projection on-the-fly by pressing the EPSG button on the bottom right-hand corner of the QGIS Project window. Let's change the projection to one that is more suitable to Missouri such as State Plane Missouri East.


1. Click on the EPSG button. The Project Properties | CRS window will pop-up.

2. In the Filter search box type NAD 1983 State Plane Missouri and under Predefined Coordinate Reference Systems you will see several results. 

3. Scroll down until you see NAD_1983_StatePlane_Missouri_East_FIPS_2401_Feet. The Authority ID is EPSG: 102696.


4. Click Apply then OK. You might get a Select Transformation for MO_2018_County_Boundaries prompt. Keep the default settings and click OK.





Exporting the Layer into A New layer with a Different Projection

If you want to permanently change the projection of a shapefile, then you will have to export  the shapefile into a new projection.

  1. Right-click on MO_County_Boundaries > Export > Save Features As... 

  2. Keep the default for the Format.
  3. For File name, navigate to the folder you wish to save the shapefile at. Name your file MO_County_Boundaries_Project.
  4. Under CRS, click the button next to the CRS dropdown menu and in the filter, type 102696 which is the EPSG (spatial reference identifer) for  NAD_1983_StatePlane_Missouri_East_FIPS_2301_Feet

  5. Confirm that the settings are the same as below and then click OK.

  6. You might get a prompt on selecting a transformation. Select the defaults and click OK.
  7. MO_2018_County_Boundaries_Project will show up tin the layers panel, but you might not see it. This is because MO_2018_County_Boundaries and MO_2018_County_Boundaries_Project are in different projections. 
  8. Right-click on MO_2018_County_Boundaries_Project > Zoom to Layer and you will see the projected shapefile.




Publishing Maps 

Export finished map as PDF 

Once you finish creating your map in the Layout view, you can export it in a variety of formats. To export your map, go to Layout and you will see three options: Export as Image, Export as SVG, and Export as PDF.  

Export as Image: You can export your map in a variety of image formats such as JPEG, GIF and TIFF. 

Export as SVG: In more current versions of QGIS, there might be an issue with this function due to bugs in the SVG library. If the SVG output does not look good, then it is recommended that you try exporting the layout to PDF. 

Export as PDF: You can export the map as an Adobe PDF.