Getting Setup With GDAL Using OSGeo4W
Revision as of 02:12, 12 April 2022 by Ellis Symons (talk | contribs)
The compiled GDAL binaries can be installed via OSGeo4W. Follow the instructions under Quick Start for OSGeo4W Users and choose "GDAL" as the package to install when prompted. The GDAL programs should be located in the installation directory, in the "bin" folder. As an example:
C:\OSGeo4W\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:\OSGeo4W\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:\OSGeo4W\share\proj set gdal_translate="C:\OSGeo4W\bin\gdal_translate.exe" %gdal_translate% <conversion_commands>
Up |
---|
Back to GDAL Tips and Tricks |