Note: This was tested on Windows 10.
- Download the GDAL Tools Installer.
- Follow the prompts. Select 'Typical' when asked to choose the setup type which best suits your needs
Once the installer is finished, do the following:
Add the directory
C:\Program Files (x86)\GDALto your system path. A tutorial for adding directories to your system path can be found here.
Add an environment variable named
GDAL_DATAand set it to the directory
C:\Program Files (x86)\GDAL\gdal-data. A tutorial for adding environment variables can be found here.
Test your installation by doing the following:
Open a new Command Prompt window, type
ogr2ogr --versionand press enter. If you see something like the following, installation of ogr2ogr was successful:
C:\Users\mq20151400>ogr2ogr --version GDAL 2.3.0, released 2018/05/04
In a Command Prompt window, type
echo %GDAL_DATA%. If you see something like the following, you correctly set the
C:\Users\mq20151400>echo %GDAL_DATA% C:\Program Files (x86)\GDAL\gdal-data