Difference between revisions of "Getting Setup With GDAL Using OSGeo4W"
Jump to navigation
Jump to search
Ellis Symons (talk | contribs) (Created page with "The compiled GDAL binaries can be installed via '''<u>[https://trac.osgeo.org/osgeo4w/ OSGeo4W]</u>'''. Follow the instructions under '''Quick Start for OSGeo4W Users''' and c...") |
Ellis Symons (talk | contribs) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | The compiled GDAL binaries can be installed via '''<u>[https://trac.osgeo.org/osgeo4w/ OSGeo4W]</u>'''. 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, | + | The compiled GDAL binaries can be installed via '''<u>[https://trac.osgeo.org/osgeo4w/ OSGeo4W]</u>'''. 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:<br> |
<pre>C:\OSGeo4W\bin</pre> | <pre>C:\OSGeo4W\bin</pre> | ||
The GDAL programs should be ready to use as they are. For example the following batch file will use "gdal_translate.exe":<br> | The GDAL programs should be ready to use as they are. For example the following batch file will use "gdal_translate.exe":<br> | ||
Line 6: | Line 6: | ||
%gdal_translate% <conversion_commands> | %gdal_translate% <conversion_commands> | ||
</pre> | </pre> | ||
− | However if you receive errors | + | 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:\OSGeo4W\share\proj | set PROJ_LIB=C:\OSGeo4W\share\proj | ||
− | set gdal_translate="C:\ | + | set gdal_translate="C:\OSGeo4W\bin\gdal_translate.exe" |
%gdal_translate% <conversion_commands> | %gdal_translate% <conversion_commands> | ||
</pre> | </pre> |
Latest revision as of 02:12, 12 April 2022
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 |