Andrew Mercer
on this page

What QGIS is

QGIS is a free, open-source desktop GIS application — the most widely used open-source alternative to commercial tools like Esri's ArcGIS Pro. It handles viewing, editing, styling, and analyzing both vector and raster spatial data, and it can connect directly to spatial databases like PostGIS as a data source rather than only working with local files.

  • Official project website: https://qgis.org

Install

Ubuntu/Debian (official QGIS repository, recommended over the distro's own package to get a current version):

sudo apt install gnupg software-properties-common
wget -qO - https://qgis.org/downloads/qgis-2022.gpg.key | sudo gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/qgis-archive.gpg --import
sudo chmod a+r /etc/apt/trusted.gpg.d/qgis-archive.gpg
sudo add-apt-repository "deb https://qgis.org/ubuntu $(lsb_release -c -s) main"
sudo apt update
sudo apt install qgis qgis-plugin-grass

Fedora:

sudo dnf install qgis qgis-python

macOS: install via the official .dmg from qgis.org, or brew install --cask qgis.

Windows: install via the official standalone installer, or the OSGeo4W network installer (which bundles GDAL, GRASS, and other dependencies alongside QGIS).

Always check https://qgis.org/download for the current recommended install method per platform, since packaging details change between releases.

Core interface concepts

  • Map canvas — the central pane where layers are rendered; supports pan/zoom and interactive feature selection.
  • Layers panel — lists all loaded vector/raster layers, controls draw order (top layers render over lower ones) and visibility.
  • Browser panel — a file/database explorer for finding and dragging in data sources (local files, PostGIS connections, WMS/WFS services) without manually using the "Add Layer" menus.
  • Layer styling panel — controls symbology: fill/stroke color, categorized or graduated styling based on an attribute, labeling rules.
  • Processing Toolbox — QGIS's interface to hundreds of spatial algorithms, including native QGIS tools, GDAL/OGR command-line tools, and (if installed) GRASS and SAGA algorithms, all callable from one searchable panel without touching a terminal.
  • Print Layout — QGIS's cartographic composer for producing a static, print-ready map (title, legend, scale bar, north arrow) as PDF or image, separate from the interactive canvas.

Connecting to PostGIS

QGIS can treat a PostGIS database as a first-class data source, letting you add tables as layers directly rather than exporting to a file first:

  1. In the Browser panel, right-click PostGIS → New Connection.
  2. Enter the host, port (default 5432), and database name — for the PostGIS setup notes in this section, that would be a host of localhost and database postgis.
  3. Enter the username/password created during PostGIS setup (postgis in the install notes referenced above).
  4. Once connected, expand the connection in the Browser panel and drag any spatial table directly onto the map canvas to add it as a layer.

This is the standard workflow for anything beyond quick local file viewing — keeping the authoritative data in PostGIS and using QGIS purely as the viewing/editing/styling client, so multiple people or tools can work against the same live dataset instead of passing files around.

Loading data

  • Vector layer: Layer → Add Layer → Add Vector Layer, or just drag a .shp, .geojson, or .gpkg file onto the canvas.
  • Raster layer: Layer → Add Layer → Add Raster Layer, or drag a .tif onto the canvas.
  • Basemaps: the QuickMapServices plugin (see below) adds one-click OpenStreetMap, satellite, and other common basemap tile layers without manually configuring an XYZ connection.

Styling basics

  • Single symbol — every feature rendered identically; the default for a new layer.
  • Categorized — a distinct style per unique value of a chosen attribute (e.g. one color per country).
  • Graduated — a color/size ramp applied across a numeric attribute's value range (e.g. darker shading for higher population).
  • Rule-based — arbitrary expression-driven styling rules, for cases the above presets can't express directly.

Labels are configured separately from symbology (in the same Layer Properties dialog), and support expressions — e.g. labeling by a formatted combination of two fields, or only labeling features above a certain zoom level.

Common workflows

  • Georeferencing — the Georeferencer tool aligns a scanned paper map or unreferenced image to real-world coordinates by matching control points, producing a usable raster layer from source material with no embedded CRS.
  • Digitizing — manually tracing new vector features (points/lines/polygons) on top of a basemap or imagery layer, with snapping to existing features to keep shared boundaries topologically clean.
  • Spatial analysis via the Processing Toolbox — buffer, clip, dissolve, spatial join, and hundreds of other operations are available without writing any SQL, useful for one-off analysis or for people who'd rather not hand-write PostGIS queries.
  • Print Layout / map export — composing a finished map with legend, scale bar, and labels for export as a static PDF/PNG, separate from the live interactive project.

Useful plugins

Installed via Plugins → Manage and Install Plugins:

  • QuickMapServices — one-click access to common basemaps (OSM, satellite imagery, etc.).
  • DB Manager (built in) — browse, query, and manage PostGIS (and other database) connections directly, including running raw SQL against a connected database from within QGIS.
  • QGIS2Web — exports a QGIS project as a standalone interactive web map (Leaflet or OpenLayers) — useful for quickly publishing a styled map without building a separate web mapping stack from scratch.
  • Geocoding plugins (e.g. MMQGIS) — batch geocode addresses to points, or reverse-geocode points to addresses.

Further reading

  • https://docs.qgis.org/latest/en/docs/user_manual/
  • PostGIS — the spatial database QGIS most commonly connects to as a backend
  • GIS Fundamentals — background on CRSs, data models, and file formats referenced throughout this guide