Skip to content
QGIS
Tutorial

QGIS Tutorial for Beginners: First Map in 30 Minutes

Published

To learn QGIS, build one real map from start to finish. This tutorial takes an empty QGIS window to an exported map in seven steps: tour the window, add a basemap, load data, style it, read its table, run one analysis and print the result. Plan about 30 minutes.

The map answers a question a city planner could ask: how many schools in Leiden, in the Netherlands, are within a 5-minute walk of a park? I built it on 12 November 2026 in QGIS 3.44.15 with free OpenStreetMap data. The answer was 64 of 67.

7steps

From an empty window to a PNG and a PDF

30min

Time to plan for a first session

64/67

Leiden schools within 400 m of a park

51s

The same question asked to AI Agent

Finished QGIS map titled Schools within a 5-minute walk of a park, Leiden: schools in orange, parks in dark green, a light green zone 400 m around the parks, a legend, a 2 km scale bar and an OpenStreetMap credit.
The map you will have at the end, exported from the QGIS print layout. Data © OpenStreetMap contributors.

What you need before you start

  • QGIS, which is free. If it is not on your computer yet, follow how to download and install QGIS, then come back. Any 3.x version works for this tutorial. I used 3.44.15, the long-term release.
  • An internet connection, for the basemap and the data.
  • No data files. Everything comes from OpenStreetMap during the tutorial.

You can follow along with your own city. Swap "Leiden" for its name in step 3 and pick the right coordinate system in the same step.

Step 1: Learn the 6 parts of the QGIS window (2 minutes)

QGIS looks crowded the first time. Six parts do almost all the work, and you can ignore the rest today.

The QGIS 3.44 main window with six numbered parts: 1 menus and toolbars at the top, 2 the Browser panel, 3 the Layers panel, 4 the map canvas in the centre, 5 the Processing Toolbox on the right, 6 the status bar at the bottom.
The QGIS window with the six parts numbered. Your window will not have the TerraLab menu: it comes from our plugins.
  1. Menus and toolbars. Every tool lives in a menu. The toolbars are shortcuts to the same tools: the hand pans the map, the magnifiers zoom.
  2. Browser panel. A file explorer for map data: your folders, plus online sources such as XYZ Tiles.
  3. Layers panel. The list of what is on your map. The top layer is drawn last, so it covers the ones below. The checkbox shows or hides a layer.
  4. Map canvas. The map itself. Scroll to zoom, hold the space bar and move the mouse to pan.
  5. Processing Toolbox. A search box over hundreds of analysis tools. Open it with Processing > Toolbox if you do not see it.
  6. Status bar. The coordinates under your mouse, the map scale and, at the right end, the coordinate system of the project (for example EPSG:28992).

If a panel is missing, right-click an empty part of a toolbar and tick its name, or use View > Panels.

Step 2: Add a basemap (3 minutes)

A basemap is a background map that shows you where you are. QGIS ships with one: OpenStreetMap.

  1. Open XYZ Tiles in the Browser

    In the Browser panel, scroll down to XYZ Tiles and click the small arrow to open it.

  2. Double-click OpenStreetMap

    The world map appears in the canvas and a layer named OpenStreetMap appears in the Layers panel.

  3. Zoom to your city

    Scroll in on the Netherlands until Leiden fills the canvas, or click in the locator bar at the bottom left, type >Leiden and pick the result.

The QGIS Browser panel with XYZ Tiles opened and OpenStreetMap selected, and the OpenStreetMap basemap of Leiden shown in the map canvas.
XYZ Tiles > OpenStreetMap in the Browser panel. Two clicks and the basemap is in.

A basemap is a picture. You cannot count its parks or measure its schools. For that you need data, which is the next step. More backgrounds, including aerial imagery, are in how to add a basemap in QGIS.

Now save the project with Project > Save (Ctrl+S, or Cmd+S on a Mac). QGIS writes a .qgz file that remembers your layers and their styles.

Step 3: Load real data from OpenStreetMap (6 minutes)

Map data comes in layers. A vector layer holds shapes (points, lines or polygons), and each shape has a row of attributes such as a name. We need two layers: parks and schools.

The fastest free source is OpenStreetMap, through the QuickOSM plugin. A plugin is an add-on you install from inside QGIS.

  1. Install QuickOSM

    Open Plugins > Manage and Install Plugins, search for QuickOSM and click Install Plugin. It takes a few seconds.

  2. Ask for the parks

    Open Vector > QuickOSM > QuickOSM and stay on the Quick query tab. Type leisure as the key, park as the value, keep In and type Leiden. Click Run query.

  3. Ask for the schools

    Change the key to amenity and the value to school, then click Run query again. Close the dialog.

The QuickOSM dialog on the Quick query tab: key leisure, value park, In Leiden, with the sentence All OSM objects with the key leisure=park in Leiden are going to be downloaded and a Run query button.
One QuickOSM query: a key, a value and a place name. OpenStreetMap lists its keys and values on wiki.openstreetmap.org.

On my run, the parks query took 40.0 seconds and the schools query 27.6 seconds. My very first attempt failed with "Bad Gateway": the public OpenStreetMap server was busy. Running the query again a minute later worked. If it keeps failing, pick another server in the Parameters tab of QuickOSM.

QuickOSM returns one layer per shape type. For Leiden I got:

QueryPolygonsPoints
leisure=park56 parks10 (ignored here)
amenity=school48 schools drawn as grounds19 schools drawn as a single point

Keep the park polygons and both school layers. Remove the park points: right-click the layer, then Remove Layer.

Save the layers in metres

This is the step beginners skip, and it breaks the analysis later. OpenStreetMap data arrives in latitude and longitude (EPSG:4326), where distances are in degrees. A 400 m buffer needs a coordinate system in metres. If the term is new, what is a CRS explains it in plain words.

The new layers are also temporary: they vanish when you close QGIS. One export fixes both problems.

  1. Export each layer

    Right-click the parks layer, then Export > Save Features As.

  2. Choose GeoPackage and a metric CRS

    Format: GeoPackage. File name: leiden.gpkg. Layer name: parks. CRS: EPSG:28992 (Amersfoort / RD New, the Dutch national grid). Click OK.

  3. Repeat for the schools

    Export both school layers into the same leiden.gpkg file, with the layer names schools and school_points. Then remove the three temporary layers.

For another country, type its name in the CRS search box and pick the national grid, or the UTM zone of your city. Then set the project to the same system: click the EPSG code in the status bar and choose it.

Step 4: Style the layers (5 minutes)

QGIS gives each new layer a random colour. Give the map a meaning: green for parks, one strong colour for schools.

  1. Open the Layer Styling panel

    Press F7, or use View > Panels > Layer Styling. Click the Parks layer in the Layers panel.

  2. Pick a colour

    Click Simple Fill, then the Fill color bar, and choose a green. Set Stroke style to No Line. The map updates as you click.

  3. Style the schools

    Select each school layer and choose an orange. Drag the school layers above the parks in the Layers panel so they are drawn on top.

  4. Calm the basemap down

    Select OpenStreetMap. In Layer Styling, set Grayscale to By lightness and the opacity to 75%. Your own layers now stand out.

QGIS with the Layer Styling panel docked on the right, the Parks layer selected with a green Simple Fill at 100 percent opacity, and the map of Leiden showing green parks and orange schools on a grey OpenStreetMap basemap.
The Layer Styling panel (F7) changes the map live. The grey basemap leaves the colour to your data.

Double-click a layer name to rename it. Those names become the legend in step 7, so write them for a reader: "Parks", "Schools".

Step 5: Read the attribute table (3 minutes)

Every shape carries data. Right-click the Parks layer and choose Open Attribute Table, or press F6.

The QGIS attribute table of the Parks layer with three columns, fid, osm_id and name, and rows such as Energiepark, Polderpark Cronesteyn, Park De Bult, Merenwijkpark, Leidse Hout and Huigpark.
One row per park. The window title counts the features: 56 for this layer.

Three things to try:

  • Sort. Click a column header.
  • Find a park on the map. Click a row number, then the Zoom map to selected rows button in the table toolbar. The park turns yellow on the map.
  • Check the gaps. In Leiden, 40 of the 56 parks have a name. Open data is never complete, and the table is where you see it.

To calculate new columns, such as the area of each park, use the QGIS field calculator.

Step 6: Run one analysis: a 400 m buffer (4 minutes)

A common planning rule of thumb counts 400 m as a 5-minute walk. A buffer draws that zone around every park.

  1. Open Buffer

    Vector > Geoprocessing Tools > Buffer. You can also type "buffer" in the Processing Toolbox.

  2. Set the distance

    Input layer: Parks. Distance: 400 meters. Tick Dissolve result so the circles merge into one zone. Click Run.

  3. Select the schools inside

    Vector > Research Tools > Select by Location. Select features from Schools that intersect the Buffered layer. Run it again for the school points.

The QGIS Buffer dialog: input layer Parks in EPSG:28992, distance 400 meters, 16 segments, round end cap and join style, and Dissolve result ticked.
The Buffer dialog. The unit reads meters only because step 3 saved the layer in a metric coordinate system.

The buffer ran in 0.1 second on 56 parks. If the unit next to the distance says degrees, go back to the export in step 3.

QGIS after Select by Location: schools inside the light green 400 m zone are highlighted in yellow, three schools stay orange, and the status bar reads 18 features selected on layer Schools (points).
Selected schools turn yellow. The status bar gives the count for the last layer: 18 of the 19 school points.

The counts for Leiden: 46 of 48 school grounds and 18 of 19 school points touch the zone. That is 64 of 67 schools within 400 m of a park, and 3 that are not.

Read that number with its limits. The 400 m is a straight line, not a route along streets, and a school drawn twice in OpenStreetMap counts twice. To attach park attributes to each school, the next tool to learn is the spatial join.

Step 7: Build the layout and export the map (7 minutes)

The canvas is your workbench. The print layout is the page you hand to someone: title, legend, scale bar, source.

  1. Create a layout

    Project > New Print Layout, give it a name and click OK. A blank A4 page opens in a new window.

  2. Add the map

    Add Item > Add Map, then drag a rectangle over the page. To reframe it, use the Move item content tool and the mouse wheel.

  3. Add a title, a legend and a scale bar

    Add Item > Add Label for the title and the source line, Add Legend, then Add Scale Bar. Click any item to edit it in the Item Properties tab.

  4. Clean the legend

    In the legend properties, untick Auto update, then remove OpenStreetMap from the list with the minus button.

  5. Export

    Layout > Export as Image for a PNG, Layout > Export as PDF for a PDF.

The QGIS print layout window with an A4 landscape page holding the Leiden map, a title, a three-line legend, a scale bar and a credit line, and the Items panel listing Scalebar, Legend, three labels and Map 1.
The print layout. Each element of the page is an item you can select, move and edit.

My exports took 2.4 seconds for the PNG at 200 dpi (2.0 MB) and 1.9 seconds for the PDF (1.6 MB). Always credit the data on the page: for OpenStreetMap the line is "© OpenStreetMap contributors".

For better maps (labels, a north arrow, classes of colour), continue with how to make a map in QGIS.

The same map from one sentence

QGIS also takes plugins that do the clicking for you. I work on one of them, AI Agent: a panel inside QGIS where you write what you want and it runs the QGIS tools itself.

I opened a new project with only the OpenStreetMap basemap and sent this sentence:

Map the schools in Leiden, Netherlands that are within a 5-minute walk (400 m) of a park, using OpenStreetMap data. Tell me how many schools are inside and how many are not.

A real run on 12 November 2026: 51 seconds and 9 tool calls, from a project that held only the basemap.Get the free QGIS pluginFree plan, no credit card.

The run took 51 seconds. It downloaded both datasets, reprojected them to the Dutch grid on its own, buffered the parks, coloured the schools by result and answered: 58 of 61 school features within 400 m, 3 beyond. It also wrote the two limits I gave above without being asked: straight-line distance, and features that are not always unique schools.

Why 58 of 61 and not 64 of 67? The two routes did not use the same data. I asked QuickOSM for objects inside the municipality of Leiden. AI Agent downloaded the area around the city, so it found 88 park polygons, some in neighbouring towns, and 13 school points where I had 19. Both counts are correct for their own definition. A number on a map depends on where you drew the boundary, and writing that boundary down is part of the work.

Limits of each route. By hand, you learn where every tool lives and you control each choice, and the first time takes half an hour. With AI Agent, the first result comes in under a minute, but you must read what it did, and it gives you layers on the canvas, not a finished print layout: step 7 is still yours, or a second request. The Free plan covers 5 tasks a month.

My advice for a beginner: do the seven steps by hand once. After that, use the agent for the routine parts and keep your attention for the question and the checks. The AI Agent guide shows a full project done that way.

Five beginner mistakes this tutorial avoids

  1. Buffering in degrees. Save layers in a metric coordinate system before any distance tool (step 3).
  2. Losing temporary layers. A layer with a small chip icon next to its name lives in memory only. Export it to a GeoPackage.
  3. Treating the basemap as data. You cannot select or count what is in a basemap.
  4. Moving the data files. The project file stores paths, not the data. Keep the .qgz and the .gpkg in one folder and move them together.
  5. Forgetting the source. A map without a data credit cannot be published.

What to learn next

How I measured this. Everything ran on 12 November 2026 on an Apple Silicon Mac (macOS 27.0.1) in QGIS 3.44.15 with QuickOSM 2.5.3 and AI Agent 1.9.5, signed in to a Pro test account with its default settings. The seconds are measured: the two downloads, the buffer, the two exports and the AI Agent run. The minutes in the step titles are a budget for a first session, not a stopwatch reading. I prepared the session with scripts, so I did not time my own clicks. OpenStreetMap changes every day: your counts will differ a little.

Frequently asked questions

Try AI Agent for free

Do it in QGIS by asking for it

AI Agent carries out the task you describe, in your own QGIS project. Free, no card.

Try AI Agent for free

Keep reading