Difference between revisions of "Getting Setup With GDAL Using QGIS Installation"

From Tuflow
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
%gdal_translate% <conversion_commands>
 
%gdal_translate% <conversion_commands>
 
</pre>
 
</pre>
However if you receive errors while trying to assign projections (or any error when working with projections) you should add this environment variable to the top of the batch file ('''Note:''' do not use quotes "" in path):<Br>
+
However if you receive errors similar to "<tt>PROJ: proj_create_from_database: Cannot find proj.db</tt>" you should add this environment variable to the top of the batch file ('''Note:''' do not use quotes "" in path):<Br>
 
<pre>
 
<pre>
 
set PROJ_LIB=C:\Program Files\QGIS 3.24.1\share\proj
 
set PROJ_LIB=C:\Program Files\QGIS 3.24.1\share\proj
Line 12: Line 12:
 
%gdal_translate% <conversion_commands>
 
%gdal_translate% <conversion_commands>
 
</pre>
 
</pre>
 +
<br>
 +
{{Tips Navigation
 +
|uplink=[[GDAL_Tips_and_Tricks#Getting_Started| Back to GDAL Tips and Tricks]]
 +
}}

Latest revision as of 01:26, 12 April 2022

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 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