gdal和python在windows上的安装

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!

时间: 2025-01-01 21:08:09

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

Python在Windows上的安装

1:下载 http://dlsw.baidu.com/sw-search-sp/soft/6e/17016/python-3.3.5.1395976247.msi 2:直接next安装 3:验证安装是否成功 C:\Users\gechong>python Python 3.3.5 (v3.3.5:62cf4e77f785, Mar 9 2014, 10:37:12) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "c

Windows 上如何安装Sqlite

1.获得命令行程序 SQLite命令行程序(CLP)是开始使用SQLite的最好选择,按照如下步骤获取CLP: 1).打开浏览器进入SQLite主页,www.sqlite.org. 2).单击页面顶部的下载链接(Download)选项,进入下载页面. 3).滚动鼠标到“Precompiled Binaries for Windows”,选择sqlite-shell-win32-x86-3071401.zip(第一项),点击下载. 4).使用解压工具,将其解压.zip文件中包含一个sqlite3.

EJBCA 在windows上的安装

为了做EJBCA的封装测试,在我自己电脑上装了个,但是在国内的开发上面的介绍实在是太少,有的也只是些傻瓜式的安装介绍,这是介绍在Windows上安装的过程,(后面介绍下 linux 红帽上的),有些也是在网上看看,有一些比较关键的地方 在下面会指出来: 推荐一个比较不错的网址:https://sourceforge.net/p/ejbca/discussion/ EJBCA Installation EJBCA是一个基于J2EE技术的全功能的开源CA系统软件,并提供了一个强大的.高性能并基于组件

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

首先jinkins在windows上的安装就不说,安装只需要下载相应安装包就可以了,后有些时候经常需要修改端口号.修改如下: 然后重启jenkins服务 首次运行界面 个人建议插件按需安装. 建立一个简单的项目运行: 这样就可以了, 很简单. 如果遇到说什么dll 无法加载,大家可以尝试 把开发环境的对应目录拷贝到jenkins服务器上. 实在不行在jienkins服务器上安装 vs2015.

Windows上PostgreSQL安装配置教程

Windows上PostgreSQL安装配置教程 这篇文章主要为大家详细介绍了Windows上PostgreSQL安装配置教程,具有一定的参考价值,感兴趣的小伙伴们可以参考一下 PostgreSQL的扩展PostGIS是最著名的开源GIS数据库. 安装PostgreSQL是第一步. 1.下载PostgreSQL的二进制安装文件. PostgreSQL官网–>Download–>Windows 64位,如图所示: (1)官网: https://www.postgresql.org/ (2)Dow

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

Windows上Tomcat安装以及解决乱码问题 下载tomcat8 1.进入tomcat官网 官方网站 2.选择windows的版本 解压 确定自己配置好了jdk jdk的相关配置 配置好tomcat的环境变量 我的电脑->右键->属性->高级系统设置->环境变量 1.新建两个系统变量CATALINA_HOME.CATALINA_BASE 对应的路径分别是: CATALINA_HOME:F:\J2EE\apache-tomcat-8.5.46 CATALINA_BASE:F:\J

paramiko在windows上的安装和使用

一:简介 paramiko是用python语言写的一个模块,遵循SSH2协议,支持以加密和认证的方式,进行远程服务器的连接. 由于使用的是python这样的能够跨平台运行的语言,所以所有python支持的平台,如Linux, Solaris, BSD, MacOS X, Windows等,paramiko都可以支持,因此,如果需要使用SSH从一个平台连接到另外一个平台,进行一系列的操作时,paramiko是最佳工具之一. 举个常见的例子,现有这样的需求:需要使用windows客户端,远程连接到L

【python】Windows中编译安装libsamplerate和scikits.samplerate

librosa缘由 librosa是一个音频和音乐处理的Python包,我用它来做音频的特征提取.但是在使用时,发现librosa.load将音乐文件转化为时间序列的过程中,速度实在难以忍受,cpu跑的非常高,程序好像假死的状态. 查阅官方文档发现,默认情况下,librosa会使用scipy.signal进行音频信号的重采样,这在实际使用时是很慢的.如果要获得很高的性能,官方建议安装libsamplerate和其相应的python模块scikits.samplerate. 这就是说,在Windo

scapy在Windows上的安装

你需要以下为软件在Windows上安装Scapy: Python:Python 2.7或3.3 +.安装后,将Python安装目录及其脚本子目录添加到您的路径中.根据你的Python版本,默认是C:\ python27和C:\ python27 \脚本分别. Npcap:最新版本.默认值是推荐.Scapy还将与WinPcap. Scapy:最新的开发版本的Git仓库.解压缩档案,目录中打开一个命令提示符运行"python setup.py install". 下载地址:https://