1. Home
  2. Explore
  3. Geography
  4. QGIS Beginner Tutorial

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

QGIS Beginner Tutorial

QGIS: A Beginner’s Guide to Desktop GIS and Spatial Analysis

QGIS is a free, open-source geographic information system. It allows users to view, organize, edit, analyze, and present data connected to locations on Earth. A beginner can use QGIS to create a simple map, while an advanced user can build complex spatial workflows, connect databases, write scripts, publish web maps, and perform sophisticated geographic analysis.

The central idea behind QGIS is that geographic information usually has two connected parts:

  1. Geometry: the location and shape of something.
  2. Attributes: descriptive information associated with that location.

For example, a park may be represented by a polygon showing its boundary. Its attribute data might include the park’s name, category, ZIP code, managing agency, and website.

Geographic data combines where something is with information about what that thing is.

Why Use QGIS?

QGIS is especially useful because it is free and open source. Free software can be downloaded and used without purchasing a commercial license. Open-source software also makes its code and development process available to the public. Contributors from around the world can improve the software, test it, document it, and create extensions for it.

This open development model has helped QGIS grow into a large ecosystem. Its capabilities are not limited to the tools included in the core program. Users can install plugins, which are extensions that add specialized functions such as:

  • Additional mapping services
  • Data-import tools
  • Advanced analysis
  • Automatic classification
  • Web-map creation
  • Digitizing and editing tools
  • Database connections
  • Specialized scientific workflows

QGIS is also cross-platform. It can run on macOS, Windows, and Linux. Because it is open and interoperable, it can also be used alongside cloud services, databases, web technologies, and other open-source software.

Range of Use

QGIS supports a wide range of users and projects. A beginner can use it to learn fundamental GIS concepts, while an experienced analyst can use it for:

  • Complex spatial analysis
  • Web mapping
  • Terrain and elevation analysis
  • Network analysis
  • Python scripting
  • Database integration
  • Processing large collections of geographic data
  • Connecting to external data services

QGIS began as a small project and developed into a broad geographic software ecosystem. Its usefulness comes partly from this ability to scale: the same application can support a basic classroom map and a more advanced professional workflow.

Community and Documentation

The QGIS project is supported by a global community. Users can find:

  • User guides
  • Training materials
  • Technical documentation
  • Support forums and user groups
  • Testing and development opportunities
  • Mailing lists and other community resources

Documentation is often organized by software version, so identifying the installed version helps users select the correct instructions. Many basic concepts remain consistent across versions, even though individual tools and interface details may change.

QGIS is distributed under an open license that permits use, sharing, and modification under specified conditions. Anyone using or redistributing the software should consult the current license for precise requirements.

QGIS is valuable not only because it costs nothing, but also because it is extensible, community-supported, and capable of growing with the user’s skills.

Think About It

Why might an organization prefer software that can be inspected, extended, and connected to other systems instead of software limited to one commercial platform?

Installing and Starting QGIS

The QGIS website provides downloads for different operating systems. The installer or application package is selected according to the user’s computer:

  • macOS
  • Windows
  • Linux and other supported systems

After downloading QGIS, the installation process depends on the operating system. On macOS, the application package is commonly dragged into the Applications folder. If an earlier version is already installed, the newer version can generally replace it, although users may choose to keep both versions when compatibility is important.

Operating-system security settings may prevent the application from opening because it was not downloaded through the computer’s official app store. In that case, the system’s security or privacy settings may provide an option to approve the application. This should only be done when the user is confident that the software came from a trustworthy source and the computer’s policies allow it.

When QGIS opens, it may display a start page containing news or project information. A new project can be created through the Project menu or by selecting the option to start a new project.

A QGIS project stores the map’s organization and settings, including:

  • Which layers are loaded
  • Layer order
  • Symbology
  • Labels
  • Project coordinate reference system
  • Map views
  • Print layouts
  • Other project configuration

The project itself does not necessarily contain every source data file. Instead, it often stores references to those files. Therefore, source data should remain in stable locations so that QGIS can continue to find it.

Understanding the QGIS Interface

The QGIS interface contains several major areas. The exact arrangement may differ slightly by operating system or user customization, but the main functions are consistent.

The Layers Panel

The Layers panel lists the geographic layers currently included in the project. It allows the user to:

  • Turn layers on and off
  • Change drawing order
  • Remove layers
  • Open layer properties
  • Filter or organize layer entries
  • Adjust visibility and other layer controls

Layer order matters because QGIS draws the map from lower layers upward. A layer placed above another may cover it. For example, a basemap placed at the top of the list could hide all thematic layers beneath it. A basemap usually belongs near the bottom, while points, lines, labels, and highlighted polygons are placed above it.

Layers can usually be reordered by dragging them or using up-and-down controls.

The Browser Panel

The Browser panel provides access to data sources and folders. It can display:

  • Local drives and folders
  • Favorites
  • GeoPackages
  • Spatial databases
  • PostgreSQL or PostGIS connections
  • SpatiaLite databases
  • Web mapping services
  • XYZ tile services
  • WMS or other remote services
  • ArcGIS REST services

A frequently used folder can be added as a favorite. This saves time because the user can return to the folder without repeatedly navigating through the entire computer’s directory structure.

The Map Canvas

The large central area is the map canvas. This is where geographic layers are displayed and explored.

The map canvas supports:

  • Panning
  • Zooming in and out
  • Selecting features
  • Identifying features
  • Measuring or inspecting locations
  • Changing map rotation
  • Viewing different scales
  • Displaying coordinate positions

The current cursor position is often shown as coordinates near the bottom of the interface. The map scale is also displayed and may be changed manually or adjusted automatically as the user zooms.

Navigation Controls

The map can be navigated in several ways:

  • Use the mouse wheel to zoom.
  • Use the pan tool to move across the map.
  • Use keyboard shortcuts such as plus and minus for zooming.
  • Enter coordinates manually to move to a particular location.
  • Copy coordinates for use elsewhere.
  • Enter a scale manually, such as 1:100,0001:100{,}0001:100,000 or 1:1,0001:1{,}0001:1,000.
  • Adjust magnification.
  • Change map rotation.
  • Use preset zoom levels or bookmarks.

A spatial bookmark saves a particular map extent. It is useful when repeatedly returning to the same city, park, study area, or other location.

QGIS also provides a rendering control. When working with a very large dataset, continuously redrawing the map can slow the application. Temporarily turning off rendering allows the user to zoom or pan without waiting for the entire map to redraw after each change. Rendering can then be turned back on when the desired view is reached.

Toolbars and Menus

The toolbars contain buttons for common actions, including:

  • Creating, opening, and saving projects
  • Printing and creating layouts
  • Zooming and panning
  • Identifying features
  • Selecting features
  • Editing geometries
  • Working with raster data
  • Performing other specialized operations

Toolbars are customizable. A toolbar can be added or removed by opening the toolbar context menu and enabling or disabling the desired group. This lets users keep frequently used tools visible while reducing clutter.

The top menus provide access to the same functions in a more organized form. Important menu groups include:

  • Project
  • Settings
  • Plugins
  • Vector
  • Raster
  • Database
  • Processing

The Help system can be used when a tool or setting is difficult to locate. Searching for a task or command is often faster than browsing every menu.

The Processing Toolbox

The Processing Toolbox contains many of QGIS’s analysis and data-conversion tools. It may include tools for:

  • Vector geometry
  • Raster processing
  • Network analysis
  • File conversion
  • Database operations
  • Coordinate transformations
  • GRASS operations
  • GDAL operations
  • Geometry creation
  • Spatial relationships

The toolbox can be searched by keyword. For example, searching for “raster” displays raster-related operations, while searching for “buffer” displays buffering tools.

The Processing Toolbox is the main workspace for repeatable spatial operations and analytical workflows.

Think About It

If a map looks empty, what should be checked first: whether the data was downloaded, whether the layer is visible, whether the layer is in the correct position in the layer order, or whether the map is zoomed to the wrong location?

Obtaining Geographic Data

A GIS project is only as useful as the data supporting it. Public open-data portals are common sources of geographic information. A city data portal may contain layers describing:

  • Parks
  • Roads
  • Trees
  • Playgrounds
  • Bike routes
  • Public facilities
  • Ecologically important areas
  • Permitted event locations
  • Wildlife observations

A useful dataset should be evaluated for several characteristics:

  • Geographic coverage: Does it include the study area?
  • Theme: Does it represent the phenomenon being studied?
  • Geometry type: Does it contain points, lines, or polygons?
  • Attributes: Does it contain the descriptive fields needed for analysis?
  • Scale and size: Is it small enough to work with efficiently?
  • Date: Does it represent the appropriate time period?
  • Format: Can QGIS read it directly?

Common Geographic File Formats

Several spatial formats commonly appear in open-data portals.

GeoJSON

GeoJSON is a convenient format for geographic vector data. It usually stores geometry and attributes in one file, making it relatively easy to download, move, and load into QGIS.

Shapefile

A shapefile is an older and widely supported spatial format. Although it is often described as one format, it normally consists of several related files. The main geometry file has the extension .shp, but other files store information such as:

  • Attribute data
  • Coordinate reference system information
  • Indexing information

The files need to remain together. Separating them can cause the dataset to lose its attributes or spatial reference information.

KML and KMZ

KML and KMZ are commonly associated with Google Earth. QGIS can read them, but they may contain properties or structural details intended for the Google Earth environment.

CSV

A CSV file is a table of rows and columns. It may contain ordinary attributes, or it may contain geographic coordinates. A CSV is not automatically a spatial layer simply because it contains latitude and longitude fields; QGIS must be told which columns represent the coordinates.

Downloading a Dataset

A typical data-acquisition workflow is:

  1. Search an open-data portal for a subject, such as parks or trees.
  2. Filter results to geographic or map-based datasets.
  3. Inspect the dataset description and source.
  4. Open the full source dataset if necessary.
  5. Select an appropriate spatial format.
  6. Download the file.
  7. Move it into the project’s data folder.
  8. Add the data to QGIS.

A portal may provide several export options. A single-file GeoJSON download is often convenient for beginners because it avoids the multiple-file structure of a shapefile.

Adding Layers to a Project

A downloaded layer can be added in several ways:

  • Drag the file from the Browser panel into the Layers panel or map canvas.
  • Use the appropriate Add Layer command.
  • Browse to the file through the data-source dialog.

After the layer is added, QGIS displays its geometry on the map. If the layer is not visible, the user should check:

  • Whether its visibility box is enabled
  • Whether another layer is covering it
  • Whether the map is zoomed to the correct area
  • Whether the layer has a valid coordinate reference system
  • Whether the layer contains features in the current map extent

Geometry and Attributes

Vector data generally uses one of three basic geometry types:

  • Points represent individual locations, such as trees or wildlife sightings.
  • Lines represent paths or networks, such as roads, trails, or bike routes.
  • Polygons represent areas, such as parks, lakes, or administrative boundaries.

The attribute table contains rows and columns associated with the geometries. Each row represents one feature. Columns may contain:

  • Text
  • Numbers
  • Dates
  • URLs
  • Categories
  • Codes
  • Measurements

For example, a park polygon may have fields describing its name, category, ZIP code, jurisdiction, and website.

The Identify Features tool displays the attributes for a feature clicked on the map. This allows the user to connect the visible geometry to the information stored in the table.

Coordinate Reference Systems and Projections

A coordinate reference system, or CRS, describes how geographic locations are represented with coordinates. A CRS tells QGIS how to interpret coordinates and how to place them on the Earth.

Geographic coordinates commonly use longitude and latitude. A projected coordinate system transforms the curved Earth onto a flat surface. Different projections make different compromises involving shape, distance, area, or direction.

Two CRS codes frequently encountered in introductory QGIS work are:

  • EPSG:4326, commonly associated with longitude and latitude coordinates.
  • EPSG:3857, commonly used by many web maps, including web-based basemaps.

The project CRS controls how layers are displayed together. QGIS can often reproject layers “on the fly,” meaning it transforms them for display even when the source files use different coordinate systems.

However, the correct CRS still matters. A dataset with longitude and latitude should not be treated as though its coordinates were already in a projected meter-based system. If it is, the features may appear in the wrong location or distance-based analysis may produce inappropriate units.

Basemaps and Web Mercator

A basemap provides geographic context such as:

  • Roads
  • Streets
  • Place names
  • Water bodies
  • Buildings
  • Boundaries

The QuickMapServices plugin can add basemaps without requiring the user to download and assemble every contextual layer manually. OpenStreetMap is one example of a commonly used basemap.

Many web basemaps use EPSG:3857. If the QGIS project uses EPSG:4326 while the basemap uses EPSG:3857, the basemap may look distorted or labels may appear strangely. Changing the project CRS to match the basemap often makes the map display correctly.

A projection should be selected according to the task. A web-map projection may be appropriate for visual alignment with a basemap, while a locally appropriate projected CRS may be better for accurate distance or area measurements.

A CRS is not merely a display preference; it determines how coordinates, distances, areas, and shapes are interpreted.

Think About It

Why is a projected CRS using meters generally more appropriate than latitude and longitude when creating a buffer of a specified distance?

Styling and Symbolizing Data

A map’s symbols should communicate meaningful differences in the data. QGIS allows users to control:

  • Color
  • Shape
  • Size
  • Opacity
  • Outline or stroke
  • Rotation
  • Label appearance
  • Drawing order
  • Blending
  • Visibility by zoom level

The styling controls are available through the layer’s properties or styling panel.

Simple Symbolization

A single symbol applies the same style to every feature in a layer. This is useful when the layer represents one general category, such as all park boundaries or all bike routes.

A single symbol can still be customized by changing its color, size, outline, transparency, or icon.

Categorized Symbology

Categorized symbology styles features according to a categorical attribute. A category is a named or coded group rather than a continuous measurement.

For example, a wildlife dataset might contain a field called primary fur color. The categories could be:

  • Black
  • Cinnamon
  • Gray

When the user selects the field and chooses Classify, QGIS creates a symbol category for each distinct value. Each category can then receive a different color or symbol.

Categorized styling is useful when the question is about group membership:

  • Which parks belong to which category?
  • Which observations have which species?
  • Which facilities have which status?
  • Which features are managed by different agencies?

The legend displays the categories and allows individual categories to be hidden or shown.

Graduated Symbology

Graduated symbology styles features according to a numeric attribute. For example, tree trunk diameter can be represented by color or size.

Graduated styling requires several decisions:

  1. Which numeric field should control the symbol?
  2. Should values be represented by color, size, or both?
  3. How many classes should be used?
  4. Which classification method should define the class boundaries?
  5. Which color ramp or size range should be applied?

Common classification methods include:

  • Equal count
  • Equal interval
  • Fixed interval
  • Logarithmic scale
  • Natural breaks

Equal count attempts to place a similar number of features in each class.
Equal interval divides the numeric range into intervals of equal width.
Natural breaks searches for groupings in the data where values are relatively similar within groups and relatively different between groups.

The best method depends on the data and the purpose of the map. A classification that works well for one dataset may make another dataset difficult to interpret.

Color Versus Size

Color is useful for showing numeric differences, especially when the map should emphasize broad patterns. Size can be more intuitive when the quantity represents physical magnitude. For instance, larger tree symbols can represent larger trunk diameters.

A map may also use both, but excessive visual variation can make interpretation difficult. Good symbology emphasizes the important pattern without overwhelming the reader.

Handling Missing or Zero Values

Large datasets often contain values recorded as zero even when zero actually means “not measured” or “unknown.” If these records are styled normally, they may dominate the map and create a misleading pattern.

For example, a tree census may contain many zero values for stump diameter. Those points could represent missing measurements rather than trees with genuinely zero trunk width. They may need to be excluded, separated into their own category, or treated as missing data.

Additional Styling Controls

QGIS provides advanced controls for:

  • Opacity
  • Drawing effects
  • Blending modes
  • Symbol rotation
  • Data-defined symbol properties
  • Point displacement
  • Point clustering
  • Heat maps
  • Rule-based styling
  • Embedded symbols
  • Zoom-dependent visibility
  • Ordering overlapping features

A symbol can be rotated according to a field containing an angle. A feature can also be shown only at particular zoom levels so that a map remains readable at both regional and local scales.

Loading CSV Coordinates as Spatial Data

A CSV containing latitude and longitude must be configured before it becomes a spatial layer.

The process is:

  1. Add the CSV as a vector layer.
  2. Identify the longitude field.
  3. Assign longitude as the XXX coordinate.
  4. Identify the latitude field.
  5. Assign latitude as the YYY coordinate.
  6. Assign the CRS that matches the coordinates, commonly EPSG:4326 for longitude and latitude.
  7. Add the layer to the project.

The order matters. Longitude corresponds to the horizontal coordinate, or XXX, while latitude corresponds to the vertical coordinate, or YYY.

If the wrong CRS is assigned, the points may appear far from their true locations. For example, points can appear in the ocean even though their coordinate values look reasonable. Assigning the correct layer CRS and zooming to the layer usually corrects the display.

Converting Attribute Types

A CSV may store numeric-looking values as text. QGIS cannot always use text fields for numerical classification or mathematical operations.

For example, a field containing trunk diameters may look like numbers but still be stored as strings. Graduated styling may fail to offer that field because QGIS does not recognize it as numeric.

The Processing Toolbox can convert the field using a refactoring operation. A text field can be changed to a numeric type such as:

  • Integer
  • Decimal
  • Floating-point value

After conversion, the field can be used for:

  • Graduated styling
  • Calculations
  • Sorting
  • Statistics
  • Filtering
  • Spatial summaries

A temporary output can be used for immediate analysis. If the result needs to persist outside the project, it should be exported as a permanent file.

Attribute Tables, Filtering, and Labels

The attribute table is more than a place to inspect data. It can also be used to:

  • Select records
  • Filter features
  • Edit values
  • Calculate fields
  • Sort records
  • Zoom to selected features
  • Pan the map to selected rows
  • Organize or inspect the dataset

Selecting a row and choosing the option to zoom to the selected feature moves the map directly to that feature’s location. This is helpful when a dataset contains many points.

Labels

Labels display attribute values directly on the map. To label a layer, the user selects the field that should appear as text. For example, a tree-status field might display labels such as “stump” or another status value.

Label settings can control:

  • Font
  • Size
  • Weight
  • Color
  • Placement
  • Background
  • Masking
  • Overlap behavior
  • Rule-based visibility

Labels should be used selectively. Displaying every attribute value at once can make a map unreadable. Labels are most effective when they support the map’s main purpose and are visible at an appropriate scale.

Editing Existing Vector Data

QGIS can edit vector geometries and attributes when the source format and permissions allow editing.

Editing a Polygon

A polygon can be adjusted by:

  1. Selecting the layer.
  2. Turning on editing mode.
  3. Selecting the vertex-editing tool.
  4. Clicking or right-clicking the polygon.
  5. Moving, adding, or removing vertices.
  6. Saving the edits.
  7. Turning editing mode off.

A vertex is a point that defines part of a line or polygon boundary. Moving a vertex changes the shape of the geometry. Adding a vertex allows the boundary to follow a more detailed shape.

Editing tools often include undo or rollback controls. If a change is not wanted, it can be reversed before saving. If several unwanted edits have been made, the user can cancel the edits for the layer rather than committing them.

Editing should be performed carefully because saving changes updates the underlying data source.

Creating a New Vector Layer

A new vector layer can be created when existing data does not contain the required features. The user chooses:

  • File location
  • File name
  • Geometry type
  • CRS
  • Attribute fields

For example, a new polygon layer called Buildings might include:

  • Polygon geometry
  • A text field called Name
  • A suitable project CRS

Once the layer is created, editing mode can be enabled and new polygon features can be drawn. When the shape is complete, the user provides the attribute values and saves the layer.

This process is called digitizing: creating geographic features by tracing or drawing them on a map, often using imagery or another reference layer.

Creating Print Layouts

A map canvas is useful for exploration, but a finished map often requires a formal layout. QGIS’s Print Layout system allows the user to assemble a map for printing or export.

A print layout may contain:

  • Map frame
  • Legend
  • Scale bar
  • North arrow
  • Text
  • Shapes
  • Images
  • Labels
  • Other map decorations

The basic workflow is:

  1. Create a new print layout.
  2. Choose or adjust the page size.
  3. Add a map item.
  4. Drag a rectangle defining the map area.
  5. Add a legend.
  6. Add a scale bar.
  7. Add a north arrow.
  8. Adjust item sizes and positions.
  9. Export or print the result.

The layout can be exported as a PDF or SVG. SVG output is useful when the map needs further editing in a vector graphics program. A layout can also be saved for reuse or for creating multiple maps with a consistent design.

A good map layout helps the audience understand what is being shown. A legend explains symbols, a scale bar communicates distance, and a north arrow communicates orientation.

Plugins and Extending QGIS

Plugins extend QGIS beyond its default tools. They are installed through the Plugins menu, which connects to the official plugin repository.

A plugin workflow generally involves:

  1. Opening the plugin manager.
  2. Searching for a plugin.
  3. Reviewing its description and compatibility.
  4. Installing or upgrading it.
  5. Restarting QGIS if necessary.
  6. Finding the plugin’s new menu item or toolbar.

Examples of useful plugin categories include:

  • Basemap services
  • OpenStreetMap data retrieval
  • Simple analysis toolkits
  • Web-map export
  • Automatic classification
  • Digitizing
  • Google Earth Engine integration
  • Additional database or processing tools

Plugins may appear in different menus after installation. A search command or the plugin documentation can help locate them.

Spatial Analysis with Vector Data

Spatial analysis examines relationships based on location. A basic example is determining how many squirrel observations occurred near playgrounds.

This type of question requires several layers:

  • Playground polygons or locations
  • Squirrel observation points
  • A distance defining “near”

Buffers

A buffer is a new zone created around a point, line, or polygon at a specified distance.

For example, a 200200200-meter buffer around a playground represents the area within 200200200 meters of that playground. Buffers transform a distance condition into a geographic area that can be analyzed.

The basic buffer workflow is:

  1. Select the input layer.
  2. Specify the buffer distance.
  3. Choose the number of segments used to approximate curved edges.
  4. Choose cap and join styles where relevant.
  5. Run the tool.
  6. Inspect or save the resulting buffer layer.

Why the CRS Matters for Buffers

If the source layer is in longitude and latitude, the distance may be interpreted in degrees rather than meters. A degree is not a constant ground distance everywhere, so it is not suitable for a simple meter-based buffer.

The layer should first be reprojected into a projected CRS appropriate for the task. After reprojection, the buffer distance can be entered in linear units such as meters.

The distinction is important:

  • Geographic CRS: coordinates often represent angular degrees.
  • Projected CRS: coordinates commonly represent distances such as meters or feet.

Counting Points in Polygons

Once buffers have been created, the Count Points in Polygons operation can determine how many point features fall inside each polygon.

In this example:

  • The buffer polygons represent areas near playgrounds.
  • The squirrel observations are the points.
  • The output contains a count field for each buffer.

The workflow is:

  1. Choose the buffer layer as the polygon layer.
  2. Choose the squirrel observations as the point layer.
  3. Run the counting operation.
  4. Examine the resulting count field.
  5. Style the polygons according to the number of points.

The result makes it possible to compare playground areas by the number of nearby squirrel observations.

Other Spatial Analysis Tools

The Processing Toolbox contains many other vector operations, including:

  • Nearest-neighbor analysis
  • Shortest lines between features
  • Distance matrices
  • Point-to-line conversion
  • Clustering
  • Geometry conversion
  • Spatial joins
  • Interpolation
  • Raster-to-vector conversion

The key principle is that spatial analysis tools transform geographic relationships into measurable outputs.

Model Builder and Reusable Workflows

The Model Designer allows multiple processing steps to be combined into a reusable model. Instead of manually running a buffer and then counting points every time, the user can build a model that performs the workflow as a single operation.

A model may contain:

  • Inputs
  • Processing algorithms
  • Connections between outputs and later inputs
  • Final outputs
  • Parameters such as distances or field selections

For the playground and squirrel example, a model could accept:

  • A polygon layer representing buffers
  • A point layer representing observations

It could then run the point-counting algorithm and produce a summarized output.

Models are useful because they:

  • Reduce repetitive work
  • Make workflows easier to reproduce
  • Lower the chance of inconsistent settings
  • Allow the same analysis to be applied to new datasets
  • Document the order of operations

Models can be saved within a project, exported, or converted into scripts for use with QGIS’s Python environment.

A model turns a sequence of manual GIS steps into a repeatable analytical procedure.

Think About It

What advantage does a model provide when the same analysis must be performed for many neighborhoods, parks, or time periods?

Raster Data and Elevation Analysis

Vector data represents discrete features using points, lines, and polygons. Raster data represents space as a grid of cells. Each cell stores a value.

A raster is useful for continuous phenomena such as:

  • Elevation
  • Temperature
  • Rainfall
  • Land cover
  • Slope
  • Satellite imagery

A Digital Elevation Model, or DEM, stores elevation values in raster cells. In a one-foot DEM, each cell represents an area approximately one foot across, and its value represents elevation.

High-resolution raster data can be very large. A dataset may occupy several gigabytes, which affects downloading, storage, rendering, and processing time. Clipping the data to the study area is often an important first step.

Clipping a Raster by a Mask

A vector polygon can be used as a mask layer to extract only the raster cells inside a study area.

For example, if the DEM covers a large portion of New York City but the analysis concerns Central Park, the Central Park boundary can be used to clip the DEM.

The workflow is:

  1. Select or create the study-area polygon.
  2. Export the selected polygon as a separate layer if needed.
  3. Choose the DEM as the input raster.
  4. Choose the study-area polygon as the mask.
  5. Run Clip Raster by Mask Layer.
  6. Use the smaller output raster for further analysis.

Clipping reduces unnecessary processing and makes the results easier to interpret.

Hillshade

A hillshade is a shaded visualization of terrain. It simulates light falling across the elevation surface. Slopes facing the imagined light source appear brighter, while slopes facing away appear darker.

Hillshade does not necessarily show elevation values directly. Instead, it emphasizes the shape of the terrain, making ridges, valleys, slopes, and depressions easier to see.

It is particularly useful for visually interpreting a DEM.

Contours

Contour lines connect locations with equal elevation. A contour map allows the viewer to understand changes in terrain using lines rather than grid cells.

Closely spaced contour lines indicate rapid elevation change or steep terrain. Widely spaced lines indicate gentler slopes. A contour layer can be styled according to elevation so that higher and lower areas receive different colors or line treatments.

Contours are often used in:

  • Topographic maps
  • Engineering
  • Planning
  • Environmental analysis
  • Trail and route design

Shaded Relief

A shaded relief map combines elevation and lighting effects to create a more visually expressive representation of terrain. It can reveal the overall topography of an area, including hills, valleys, flat areas, and depressions.

Central Park provides a useful example because its landscape includes relatively flat areas as well as rocky outcrops and elevation changes. A high-resolution DEM can reveal these variations even when the total elevation difference is not enormous.

Raster Analysis Beyond Visualization

QGIS can also perform more analytical raster operations, including:

  • Reclassification
  • Rounding
  • Zonal statistics
  • Raster creation
  • Terrain analysis
  • Raster-to-vector conversion
  • Interpolation

Raster data can be used to enrich vector data. For example, elevation values can be extracted at point locations, allowing a tree, building, or observation point to be associated with the elevation of the cell beneath it.

Network Analysis

A network is a connected system of lines through which movement occurs. Examples include:

  • Roads
  • Streets
  • Bike paths
  • Trails
  • Transit routes

Network analysis uses the structure of the network to calculate routes or areas of accessibility.

Preparing Network Analysis

A basic network workflow requires:

  • A line layer representing the network
  • Starting locations
  • Destination locations
  • A rule for selecting routes

Point locations can be created in a new point layer. Each point receives an identifier and is placed at a selected location on the map.

Shortest and Fastest Paths

QGIS network tools can calculate routes using criteria such as:

  • Shortest path
  • Fastest path

The shortest path minimizes distance. The fastest path may minimize travel time if speed information is available. A more advanced network dataset may include fields for speed, direction, or one-way restrictions.

The basic route workflow is:

  1. Create or load a network line layer.
  2. Create point features representing destinations.
  3. Choose a network-analysis algorithm.
  4. Select the network layer.
  5. Select the destination points.
  6. Specify a starting point.
  7. Choose shortest or fastest path.
  8. Run the algorithm.
  9. Inspect the resulting route lines.

The result can show routes from one origin to several destinations. Similar tools can calculate service areas, nearest routes, and other accessibility measures.

For larger or more advanced routing projects, QGIS can work with spatial databases and routing systems such as PostGIS-based tools.

Publishing a Web Map

A QGIS project can be exported as an interactive web map using a plugin such as QGIS2Web.

The export process can include:

  • Selecting which layers to publish
  • Enabling clustering for point data
  • Choosing fields for pop-up windows
  • Configuring appearance
  • Enabling geolocation
  • Selecting a web-mapping framework such as OpenLayers or Leaflet
  • Choosing an output folder

The exported web map typically contains:

  • An HTML file
  • JavaScript files
  • CSS files
  • Images
  • Geographic data
  • Other supporting resources

Opening the HTML file in a browser displays an interactive map. Users can zoom, pan, inspect clustered points, and click features to view pop-up attribute information.

The map can be hosted online by placing the exported files on a suitable web server or storage service. This creates a path from desktop GIS analysis to online geographic communication.

Bringing the Workflow Together

A typical beginner-to-intermediate QGIS project may follow this sequence:

  1. Install QGIS.
  2. Create a new project.
  3. Organize source data in a project folder.
  4. Add geographic layers.
  5. Inspect geometry and attributes.
  6. Set or verify the project CRS.
  7. Add a basemap for geographic context.
  8. Reorder and manage layers.
  9. Style categorical and numeric data.
  10. Convert fields when data types are incorrect.
  11. Add labels where appropriate.
  12. Edit existing features or digitize new ones.
  13. Run spatial analysis such as buffers and point counts.
  14. Process raster data such as elevation models.
  15. Run network calculations if movement through a connected system matters.
  16. Build a reusable model for repeated analysis.
  17. Create a print layout or export a web map.
  18. Save the project and permanent output layers.

Each step builds on the previous one. Data must be correctly located before it can be symbolized, and the CRS must be appropriate before distances or buffers can be trusted. Attribute types must be correct before numerical classification can work. Analysis results can then be styled and communicated through a print or web map.

Comprehensive Review

QGIS is a free, open-source, cross-platform GIS application that supports mapping, editing, spatial analysis, raster processing, network analysis, databases, scripting, and web publishing.

The most important concepts are:

  • Layers organize geographic information.
  • Points, lines, and polygons represent different kinds of geographic features.
  • Attributes describe those features in tables.
  • Coordinate reference systems tell QGIS how coordinates relate to the Earth.
  • Projected CRSs are generally more suitable for distance-based operations using units such as meters.
  • Basemaps provide visual context.
  • Categorized symbology represents groups or classes.
  • Graduated symbology represents numerical variation.
  • Labels display selected attribute values directly on the map.
  • Editing and digitizing create or modify geographic geometries.
  • Buffers represent areas within a specified distance.
  • Point-in-polygon analysis summarizes point observations inside areas.
  • Raster datasets represent values in grid cells.
  • DEM, hillshade, contours, and shaded relief help analyze and visualize terrain.
  • Network analysis calculates routes through connected line systems.
  • Plugins extend QGIS with additional tools.
  • Model Designer makes workflows reusable.
  • Print layouts create polished static maps.
  • Web-map export turns a desktop project into an interactive online map.

The most important habit is to think of every GIS project as a relationship among location, attributes, coordinate systems, and analytical purpose. A successful map is not simply a collection of colored shapes. It is a carefully organized representation of geographic data in which the geometry, attributes, projection, analysis, and visual design all support the question being investigated.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent