GDAL is a useful command line tool to process spatial data, if you haven’t heard of the tool before some examples of what it can do are:

  • Create contours from a DEM
  • Create a TMS tile structure
  • Rasterize vector into a raster file
  • Build a quick mosaic from a set of images

Each of the above functions are python scripts which can be run from the command-line once GDAL is successfully installed.

This tutorial covers how to install GDAL on a Windows PC, if you are interested in getting GDAL running on a Mac please go here (http://sandbox.idre.ucla.edu/?p=779).

Step 1: Install Python

Python is necessary for GDAL, and if you already have an installation of Python then skip to step 4 below.

1. Feel free to download the latest 2.7x version of python (rather than the 3.x python version).

The python version used for this tutorial can be downloaded here:

https://www.python.org/ftp/python/2.7.8/python-2.7.8.msi

2. Install python with the default options and directories.

3. After installation, go to Python –> IDLE (Python GUI) to find out what version of Python you are using:

4. Make a note of the number that shows the version of your Python in the top right, as highlighted below:

Note: MSC v.1500  may differ if you are using a different Python installation, if it does then please make a note of that number. Note, if you installed the 64-bit version of Python, for the rest of the tutorial please remove the (x86) from the paths.

Step 2: Install GDAL

1. Head over to Tamas Szekeres’ Windows binaries and download the appropriate GDAL Binary.

For this tutorial, we are using the MSC v.1500 on a 32-bit system, the picture below illustrates how to match the version with your own python version. The blue highlight is where you should look for either 64-bit or 32-bit systems, and the green shows the release-1500 number which should match the number from IDLE in step 4 above.

2. Clicking the link will take you to the list of binaries (installers) to download.

3. Locate the “core” installer, which has most of the components for GDAL.

4. After downloading your version, install GDAL with standard settings.

5. Next, return to the list of GDAL binaries and install the python bindings for your version of Python, this can either be 2.7, 3.1, or 3.2.

Recall that we had installed Python 2.7 earlier, so we have to locate this version, as seen below:

6. Download the Python bindings and install them.

Step 3: Adding Path Variables:

We need to tell Windows system where the GDAL installations are located, so we need to add some system variables.

1. Right click on “Computer” on the desktop and go to “Properties”:

2. Click on Advanced System Properties

3. Select Environment Variables.

4. Under the System variables pane, find the ‘Path’ variable, then click on Edit.

5. Go to the end of the box and copy and paste the following:

;C:Program Files (x86)GDAL

Note: For 64-bit GDAL installations you would simply remove the (x86) after Program Files.

6. In the same System variables pane, click on “New” and then add the following in the dialogue box:

Variable name: GDAL_DATA

Variable value: C:Program Files (x86)GDALgdal-data

7. Click “OK”

8. Add one more new variable by clicking “New…”

10. Add the following in the dialogue box:

Variable name: GDAL_DRIVER_PATH

Variable value: C:Program Files (x86)GDALgdalplugins

11. Click “OK”

Step 4: Testing the GDAL install

1. Open the Windows command line, by going to the Start Menu -> Run ->Type in cmd and press Enter.

2. Type in

gdalinfo --version

3. Press Enter.

4. If you get the following result, then congratulations your GDAL installation worked smoothly!

gdal和python在windows上的安装的更多相关文章

  1. Python在Windows上的安装

    1:下载 http://dlsw.baidu.com/sw-search-sp/soft/6e/17016/python-3.3.5.1395976247.msi 2:直接next安装 3:验证安装是 ...

  2. Python 在windows上安装BeautifulSoup和request以及小案例

    Python以及PyCharm安装成功后,操作如下: 此时,代码import requests不报错了. 那么,Python 在windows上安装BeautifulSoup,怎么操作呢? 1. 打开 ...

  3. (转)windows上virtualenv 安装及使用

    [注意]要在某个含有空格的目录下面创建virtualenv环境,就要安装 win32api . 原文地址:http://blog.csdn.net/liuchunming033/article/det ...

  4. windows上pip安装及使用详解

    windows上pip安装及使用详解 2018-11-21 19:49:58 十二笔 阅读数 8229更多 分类专栏: Python学习   版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA ...

  5. jinkins在windows上的安装 配置C#编译

    首先jinkins在windows上的安装就不说,安装只需要下载相应安装包就可以了,后有些时候经常需要修改端口号.修改如下: 然后重启jenkins服务 首次运行界面 个人建议插件按需安装. 建立一个 ...

  6. git在windows上的安装和简单使用

    git在windows上的安装和简单使用. 参考: https://git-scm.com/book/zh/v1/Git-%E5%9F%BA%E7%A1%80-%E8%BF%9C%E7%A8%8B%E ...

  7. Windows上PostgreSQL安装配置教程

    Windows上PostgreSQL安装配置教程 这篇文章主要为大家详细介绍了Windows上PostgreSQL安装配置教程,具有一定的参考价值,感兴趣的小伙伴们可以参考一下 PostgreSQL的 ...

  8. Windows上Tomcat安装以及解决乱码问题

    Windows上Tomcat安装以及解决乱码问题 下载tomcat8 1.进入tomcat官网 官方网站 2.选择windows的版本 解压 确定自己配置好了jdk jdk的相关配置 配置好tomca ...

  9. Python在Windows上安装配置测试

    Python是跨平台的,它可以运行在Windows.Mac和各种Linux/Unix系统上.在Windows上写Python程序,放到Linux上也是能够运行的. 2.x还是3.x 目前,Python ...

随机推荐

  1. Wordpress Jigoshop插件路径泄露漏洞

    漏洞名称: Wordpress Jigoshop插件路径泄露漏洞 CNNVD编号: CNNVD-201311-109 发布时间: 2013-11-12 更新时间: 2013-11-12 危害等级:   ...

  2. ☀【插件】iScroll

    iScroll 4.2.5 中文API √http://www.gafish.net/api/iScroll.html -webkit-overflow-scrolling: touch <!D ...

  3. WCF 第五章 会话级别的实例

    会话在分布式应用程序中广泛用于维护每个用户的状态.在站点或者基于站点的应用中,将每个用户的状态存储于会话中很常见.这这些情况中,用户和会话间有一个1:1比例.WCF以一个类似的概念支持服务.使用Ins ...

  4. LightOJ 1341 Aladdin and the Flying Carpet 数学

    题意:给个矩形的面积a,和矩形的最小边长b,问有多少种矩形的方案(不能是正方形) 分析:a可以写成x,y,因为不能是正方形,所以设x<y,那么x<sqrt(a),y>sqrt(a) ...

  5. 关于sharepoint事件接收器中properties.AfterProperties[""].Tostring()取值的问题。

    这个这个属性是不能获取到中文的意思,他是获取AfterProperties的集合的值. string name=properties.AfterProperties["登录人"]. ...

  6. JDK1.5新特性(三)……Varargs

    援引 Varargs - This facility eliminates the need for manually boxing up argument lists into an array w ...

  7. 电脑IP改变后oracle em无法登陆的解决办法(亲测)

    以下方法为本人亲测 情况:假设电脑初次安装oracle时的ip是192.168.133.110 那么进入em的地址就是http://192.168.133.110:1158/em/console/lo ...

  8. 立体视觉-opencv中立体匹配相关代码

    三种匹配算法比较 BM算法: 该算法代码: view plaincopy to clipboardprint? CvStereoBMState *BMState = cvCreateStereoBMS ...

  9. 关于SpingMVC实现文件下载你所不知道的

    http://www.cnblogs.com/yolanda-lee/p/4683422.html 文件的上传下载一般在项目中还是非常实用的,此处专门整理一下文件的下载,至于文件的上传实现将在后续中补 ...

  10. android安全问题(八)伪造短信(利用原生android4.0漏洞)

    导读:本文利用android4.0的一个原生漏洞来伪造短信.无须声明任何权限即可伪造发送方为任何号码的短信给用户. android4.0发布已经是很久很久很久很久以前的事情了,这个漏洞早就报了出来,之 ...