Frequently Asked Questions (FAQ)
Answers to questions I’m asked frequently, but where the information isn’t in one of my regular workbooks.
Email me using the link at the bottom of the page if you have any other questions - but please check this document and the relevant workbook before you do. Remember the workbook also lists other sources of help, including YouTube videos, and a search of the web can often give you useful information.
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:
- Install a version of QGIS newer than 3.26.
- Or use the Python console to link to proj.db by doing the following:
- Open the Python console by going to
Plugins > Python console. - When it opens, type in the two lines of code below.
- Open the Python console by going to
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 tool sometimes causes an error and doesn’t run.
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.
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.
Some processing tools are failing with an error if I try to save the output to a temporary layer
Problem
When running a processing tool in QGIS and generating a temporary layer as output, the tool fails with an error and doesn’t generate the output layer(s). The error message says something about a particular file not being specified. If you run the same tool with exactly the same parameters, but save the output to a file, it works with no problem.
You can get around this easily when running individual tools, just by saving the output to file, but if building a graphic model it isn’t possible to use the output of one algorithm as the input to another.
Solution
The solution appears to be to change the default output extension in the QGIS options as this may be set to a format such as xtf.
In QGIS, go to Settings > Options. Look for the Processing tab and click on the General subheading at the top of that page. Next to Default output vector layer extension type gpkg. It’s also worth checking the default output raster layer extension is set to tif.
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.
An alternative for University of Leeds members is to use ABBYY Fine Reader PDF from AppsAnywhere.