GIS frequently asked questions

Answers to questions that I'm asked frequently, but that aren't in one of the regular workbooks.

Email me using the address at the bottom of the page if you have any other questions - but please check the workbook for the answer before you do so! Remember that the workbook also lists other sources of help, including YouTube videos, and that a search of the web can often give you useful information.

Contents

Questions and Answers: QGIS edition

I'm getting an error when I try to assign a projection, or reproject a layer in QGIS. I'm using a Mac.

Problem

When you try to run the Assign Projection or Warp tools in QGIS, you get an error which says "ERROR 1: PROJ: proj_create_from_database: Cannot find proj.db". The tool doesn't correctly reproject your layer.

Solution

This seems to be a problem with particular versions of QGIS on a Mac. There is a page about the proj.db problem on the web.

The possible solutions appear to be:

		import os

		os.environ["PROJ_LIB"]="/Applications/QGIS.app/Contents/Resources/proj"
	    

I can't run the Fix Geometries tool successfully. I'm using a Mac.

Problem

Sometimes you need to run the Fix Geometries tool before being able to use some selection or extraction tools, such as Intersect, Select by Location or Extract by Location. Unfortunately, on a Mac, this is causing an error and not running.

Solution

Unfortunately this seems to be a problem with Mac not having an updated QGIS package. There doesn't seem to be a solution at the moment (March 2023), but we'll keep an eye on the Github page about the error.

Until a solution becomes available, all I can suggest is that you try the selection/intersection/extraction tool without using fix geometries. Sometimes this will work. If you get an error telling you that you need to fix geometries, then I'm afraid the only solution I can suggest for now is to log on to a Windows computer in a cluster to run this part of the processing.

My panels have disappeared in QGIS

Problem

You've been using QGIS, and have managed to close one of the panels, such as the Browser or Layers panel. How do you get these back again?

Solution

It's very easy to close panels by mistake, and once you know how, it's also very easy to get them back.

Go to View > Panels on the menu bar and put a tick in the box next to the panel(s) that is missing. It should reappear.

A similar thing works for toolbars too. Go to View > Toolbars on the menu and click the correct box.

I'm importing a spreadsheet with numbers. I'm changing the type to a number, but the fields are still importing as text.

Problem

There seems to be a problem with the Spreadsheet plugin at the moment. Even if you change columns to a numerical type, such as Real before you import them, they are still text once imported. This means you can't then use them in the Field Calculator to create a Total column.

Solution

You can correct this problem by using the Refactor fields tool. Search for Refactor in the Processing toolbox. Once you open that tool you can change field types, so change the fields to Decimal (double) or Integer (if you don't have decimal places) and you should be able to use the field calculator on them.

How do I add a copyright symbol to layout text?

Problem

You're adding a copyright acknowledgement to your map and need to use the copyright symbol - ©.

Solution

The solution to this depends on whether you are on a Mac or PC.

I've scanned my geological field slip and it's in pdf format, but now I can't add it to GIS to georeference it.

Problem

As you've discovered QGIS won't allow you to add pdf files to a map. You need to convert the pdf to png, tiff or jpg formats - any of which will be fine.

Solution

Either rescan the document and select jpg or tiff output, or (and this may be the simpler way to do it!) use one of the many online converters. smallpdf.com is easy to use. It can convert between pdf and various file types including jpg.

Clicky