Skip to main content

Lesson 3: Label ingoa wāhi

Complexity: foundation → intermediate
Outcome: a GeoPackage place-name layer in EPSG:2193 with readable labels, macrons intact and the original source wording preserved.

Before you begin

Complete Lessons 1 and 2 first.

You need:

The CSV contains three public place-name records checked against the New Zealand Gazetteer. It is demonstration data, not an authoritative Māori cultural dataset.

The important coordinate fields are:

longitude
latitude

Those coordinates use WGS 84 / EPSG:4326. The QGIS project uses NZTM2000 / EPSG:2193. You must tell QGIS the source CRS correctly before exporting the working copy.

1. Download the CSV into the source folder

  1. Click the Wairarapa public-place demonstration CSV.
  2. Your browser will either download the file or display it as text.
  3. If it downloads, open your Downloads folder in File Explorer or Finder.
  4. Copy or move the downloaded file into:
qgis-course/01_source/
  1. Rename it only if necessary so the filename is:
wairarapa-public-place-demo.csv
  1. If the browser displayed the CSV instead, use the browser's save command and save it directly into 01_source with that exact filename.
  2. Do not edit the file yet.

You should now have

01_source/wairarapa-public-place-demo.csv

2. Inspect the source file outside QGIS

  1. Right-click the CSV in File Explorer or Finder.
  2. Open it in a text editor or spreadsheet application.
  3. Check that the first row contains field names.
  4. Find the columns longitude and latitude.
  5. Look at the place-name text and confirm macrons display as proper characters rather than boxes or replacement symbols.
  6. Close the file without changing it.

The source file stays unchanged throughout the lesson.

3. Open the course project

  1. Start QGIS if it is not already open.
  2. Choose Project → Open….
  3. Open 03_project/qgis-course.qgz.
  4. Confirm the project CRS in the lower-right corner is EPSG:2193.
  5. Save the project.

4. Open the Delimited Text importer

  1. Choose Layer → Add Layer → Add Delimited Text Layer….
  2. The Data Source Manager opens on Delimited Text.
  3. Beside File name, click the browse button .
  4. Browse to qgis-course/01_source.
  5. Select wairarapa-public-place-demo.csv.
  6. Click Open.
  7. QGIS should recognise the comma-separated columns automatically.
  8. Look at the data preview in the lower part of the dialog.
  9. Confirm fields such as matched_name, longitude and latitude appear as separate columns.

If the entire row appears in one column, select CSV (comma separated values) or explicitly choose comma as the delimiter before continuing.

5. Tell QGIS which columns contain the coordinates

In the same Delimited Text dialog:

  1. Find Geometry definition.
  2. Choose Point coordinates.
  3. Set X field to:
longitude
  1. Set Y field to:
latitude
  1. Find Geometry CRS.
  2. Click the CRS selector if it does not already show WGS 84.
  3. Search for 4326.
  4. Select WGS 84 – EPSG:4326.
  5. Click OK in the CRS selector if a separate CRS window opened.
  6. Re-check that X is longitude and Y is latitude.
  7. Click Add.
  8. Click Close.

You should now see

A new point layer in the Layers panel. The points should appear in the Wairarapa even though the project is EPSG:2193. QGIS transforms the EPSG:4326 source coordinates for display.

If the map does not move automatically:

  1. Right-click the imported CSV layer.
  2. Choose Zoom to Layer(s).
  3. Confirm the points appear in Aotearoa rather than near latitude 0 / longitude 0 or another continent.

6. Rename the temporary CSV layer clearly

The layer still reads from the source CSV.

  1. Right-click the new CSV point layer.
  2. Choose Rename Layer.
  3. Rename it:
Wairarapa public place demo - source CSV
  1. Press Enter.
  2. Save the QGIS project.

Renaming the layer in QGIS does not rename or alter the CSV file on disk.

7. Inspect the imported attributes

  1. Right-click the source CSV layer.
  2. Choose Open Attribute Table.
  3. Find place_as_written.
  4. Find matched_name.
  5. Find name_source_id.
  6. Find longitude and latitude.
  7. Find review_status and verified_date.
  8. Check that the names and macrons are intact.
  9. Note that the source wording and matched name are separate fields.
  10. Close the table.

Do not overwrite place_as_written simply because you prefer a different display label. It records what the source contained.

8. Export the working copy to the course GeoPackage

A CSV coordinate layer is useful as a source, but the course working data belongs in course.gpkg.

  1. Right-click Wairarapa public place demo - source CSV.
  2. Choose Export → Save Features As….
  3. Set Format to GeoPackage.
  4. Beside File name, click the browse button.
  5. Browse to qgis-course/02_working.
  6. If course.gpkg already exists, select it. If it does not exist, type:
course.gpkg
  1. Click Save or Open, depending on whether you are creating or choosing the file.
  2. Set Layer name to:
ingoa_wahi
  1. Find the output CRS setting.
  2. Set it to NZGD2000 / New Zealand Transverse Mercator 2000 – EPSG:2193.
  3. Leave Add saved file to map enabled.
  4. Click OK.
  5. Wait for the export to finish.
  6. A new layer named ingoa_wahi should appear in the Layers panel.
  7. Save the QGIS project.

You should now see

Both:

Wairarapa public place demo - source CSV
ingoa_wahi

They should draw in the same locations even though the source CSV is EPSG:4326 and the GeoPackage working layer is EPSG:2193.

9. Verify the working CRS

  1. Right-click ingoa_wahi.
  2. Choose Properties.
  3. Click Information.
  4. Find the CRS.
  5. Confirm it is EPSG:2193.
  6. Click OK or Cancel without changing anything.

If it says EPSG:4326, repeat the export and deliberately choose EPSG:2193 as the output CRS. Do not use Set Layer CRS to disguise a wrong export.

10. Turn on simple labels

  1. Double-click ingoa_wahi in the Layers panel.
  2. Click Labels in the left-hand list.
  3. At the top of the Labels page, change No labels to Single Labels.
  4. In Value, choose the field:
matched_name
  1. Click Apply.
  2. Look at the map canvas behind the dialog if visible.
  3. The place names should now appear beside the points.

11. Make labels readable over imagery

Still in Layer Properties → Labels:

  1. Open the Text section if it is collapsed.
  2. Choose a readable text size. Start around 10 points for this exercise.
  3. Open the Buffer section.
  4. Tick Draw text buffer.
  5. Set the buffer size to about 1 mm.
  6. Use a light buffer colour if your text is dark, so the names remain legible over imagery.
  7. Click Apply.
  8. Confirm the labels are easier to read.

Do not use tiny text simply to make collisions disappear.

12. Use a fallback label expression

The layer contains both a checked matched name and the wording found in the source. Create a label expression that uses the checked name first but does not destroy the source field.

  1. In the Labels Value area, click the expression button beside the field control.
  2. The Expression String Builder opens.
  3. Delete the existing expression if necessary.
  4. Enter exactly:
coalesce("matched_name", "place_as_written")
  1. Click OK.
  2. Click Apply.

coalesce() returns the first non-null value. The expression changes only the label display. It does not rewrite either field.

13. Set scale-dependent label visibility

The official QGIS 3.44 interface treats Minimum as the most zoomed-out boundary and Maximum as the most zoomed-in boundary.

For this small demonstration, stop the labels drawing when you zoom far out to a regional or national view.

  1. Stay in Layer Properties → Labels.
  2. Open the Rendering section.
  3. Tick Scale dependent visibility.
  4. In Minimum (exclusive), enter:
250000
  1. Leave Maximum (inclusive) unset for this exercise.
  2. Click Apply.
  3. Click OK.
  4. Zoom close to the three points. Labels should display.
  5. Zoom out beyond approximately 1:250,000. Labels should stop displaying.
  6. Zoom back in. They should return.
  7. Save the project.

If your QGIS build presents the fields in a slightly different visual order, use the labels beside the fields rather than assuming the left-hand box is always Minimum.

14. Inspect the Gazetteer references

  1. Right-click ingoa_wahi.
  2. Open the attribute table.
  3. Find the name_source_id values.
  4. Keep the table open or write down one ID.
  5. Open the New Zealand Gazetteer in your web browser.
  6. Search the public Gazetteer for the corresponding name or ID.
  7. Compare the displayed official/current record with the fields in your teaching layer.
  8. Return to QGIS.
  9. Close the attribute table.

The Gazetteer ID is more useful for later checking than a copied coordinate on its own because it points back to the naming record.

15. Record the conversion in the README

Open 03_project/README.md and add under Method notes:

Lesson 3 ingoa wāhi import
Source file: 01_source/wairarapa-public-place-demo.csv
Source coordinate fields: longitude, latitude
Source CRS: WGS 84 / EPSG:4326
Working layer: 02_working/course.gpkg → ingoa_wahi
Working CRS: NZTM2000 / EPSG:2193
Label expression: coalesce("matched_name", "place_as_written")
Source wording retained: yes

Save the README.

16. Reopen the project and verify persistence

  1. Save the QGIS project.
  2. Close QGIS or close the project.
  3. Reopen 03_project/qgis-course.qgz.
  4. Right-click ingoa_wahi and choose Zoom to Layer(s).
  5. Confirm the points still draw.
  6. Confirm labels still draw when zoomed in.
  7. Open the attribute table and confirm macrons remain intact.
  8. Right-click ingoa_wahiProperties → Information and confirm EPSG:2193.

Verify before moving on

You should be able to show:

  • the untouched CSV in 01_source
  • longitude used as X and latitude as Y
  • EPSG:4326 assigned to the source-coordinate import
  • ingoa_wahi saved in course.gpkg
  • EPSG:2193 on the working layer
  • macrons intact in the attribute table and labels
  • separate place_as_written and matched_name fields
  • the label expression
  • labels disappearing when zoomed far enough out
  • Gazetteer IDs still present in the working data

Common problems

Points appear in the wrong country or ocean

Re-add the CSV. Confirm X = longitude, Y = latitude, and Geometry CRS = EPSG:4326. Do not manually drag the points into place.

The CSV appears as a table with no points

Reopen Layer → Add Layer → Add Delimited Text Layer… and choose Point coordinates, not No geometry.

Macrons are broken

Check the original CSV in a UTF-8-capable text editor. Do not repair only the visible labels while leaving corrupted attributes behind.

The working layer still reports EPSG:4326

Repeat Export → Save Features As… and explicitly set the output CRS to EPSG:2193. Changing only the declared CRS is not the same as reprojecting coordinates.

Labels disappear when I zoom in instead of out

Check the Minimum (exclusive) and Maximum (inclusive) labels in the Rendering section. For this exercise 250000 belongs in the most zoomed-out boundary field, Minimum (exclusive).

Labels overlap

Keep readable text. Use scale visibility and QGIS label placement rather than shrinking labels until nobody can read them.

Next: Lesson 4: Create a local layer.

Official references: QGIS delimited text files and QGIS visibility scale selector.

Test basis: QGIS 3.44 LTR. Last reviewed: 4 September 2026