Getting Setup With GDAL Using QGIS Installation

From Tuflow
Revision as of 01:14, 12 April 2022 by Ellis Symons (talk | contribs)
Jump to navigation Jump to search

If you have QGIS installed, you will also have GDAL installed. The GDAL programs will be located within the QGIS installation directory, usually within the "bin" folder. As an example:

C:\Program Files\QGIS 3.24.1\bin

The GDAL programs should be ready to use as they are. For example the following batch file will use "gdal_translate.exe":

set gdal_translate="C:\Program Files\QGIS 3.24.1\bin\gdal_translate.exe"
%gdal_translate% <conversion_commands>

However if you receive errors while similar to "PROJ: proj_create_from_database: Cannot find proj.db" you should add this environment variable to the top of the batch file (Note: do not use quotes "" in path):

set PROJ_LIB=C:\Program Files\QGIS 3.24.1\share\proj
set gdal_translate="C:\Program Files\QGIS 3.24.1\bin\gdal_translate.exe"
%gdal_translate% <conversion_commands>


Up
Go-up.png Back to GDAL Tips and Tricks