Difference between revisions of "Getting Setup With GDAL Manually"
Ellis Symons (talk | contribs) |
Ellis Symons (talk | contribs) |
||
Line 23: | Line 23: | ||
<li> Copy all the files from the "<tt>bin\proj7\share</tt>" ("<tt>C:\GDAL\bin\proj7\share</tt>") into the newly created "share" folder | <li> Copy all the files from the "<tt>bin\proj7\share</tt>" ("<tt>C:\GDAL\bin\proj7\share</tt>") into the newly created "share" folder | ||
</ol> | </ol> | ||
+ | |||
+ | ===Running the Programs=== | ||
+ | The GDAL programs can now be used. Use the ".exe" programs that were copied into "<tt>C:\GDAL\bin</tt>" and not located in the original "apps" folder. As an example:<Br> | ||
+ | <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> | ||
+ | <pre> | ||
+ | set gdal_translate="C:\GDAL\bin\gdal_translate.exe" | ||
+ | %gdal_translate% <conversion_commands> | ||
+ | </pre> | ||
+ | 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> | ||
+ | set PROJ_LIB=C:\GDAL\proj7\share | ||
+ | set gdal_translate="C:\GDAL\bin\gdal_translate.exe" | ||
+ | %gdal_translate% <conversion_commands> | ||
+ | </pre> | ||
+ | <br> | ||
+ | {{Tips Navigation | ||
+ | |uplink=[[GDAL_Tips_and_Tricks#Getting_Started| Back to GDAL Tips and Tricks]] | ||
+ | }} |
Revision as of 02:12, 12 April 2022
This page describes how to download and install the GDAL programs manually.
Download
The pre-compiled GDAL programs and other binaries can be downloaded from the following location:
https://www.gisinternals.com/release.php
The page lists many download links:
- Users should choose x64 Arch (architecture) if they are using a x64 bit operating system
- The "MSVC" column is the compiler version. It generally doesn't matter except if you are trying to replicate a previously run GDAL Program results exactly, then you should use the compiler and GDAL version used to produce those results. For format conversion, generally the compiler won't have any affect.
On the next page users should select "Compiled binaries in a single.zip package"
Installation
There is no formal installation process required. The below steps are recommended as it will make running the programs a lot easier without needing to setup custom environment variables:
- Unzip the downloaded file into a location of your choice. For the examples below, it will be assumed that they were unzipped to "C:\GDAL".
- Navigate to the following directory in the unzipped directory "bin\gdal\apps". Following our chosen directory from step 1 this is "C:\GDAL\bin\apps".
- Copy all the files in the "app" directory into the "bin" directory ("C:\GDAL\bin")
- Create a new folder called "share" underneath the main directory, above the "bin" folder ("C:\GDAL\share")
- Create a new folder called "proj" underneath the new "share" folder ("C:\GDAL\share\proj")
- Copy all the files from the "bin\proj7\share" ("C:\GDAL\bin\proj7\share") into the newly created "share" folder
Running the Programs
The GDAL programs can now be used. Use the ".exe" programs that were copied into "C:\GDAL\bin" and not located in the original "apps" 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:\GDAL\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:\GDAL\proj7\share set gdal_translate="C:\GDAL\bin\gdal_translate.exe" %gdal_translate% <conversion_commands>
Up |
---|
Back to GDAL Tips and Tricks |