| 
  • This workspace has been inactive for over 11 months, and is scheduled to be reclaimed. Make an edit or click here to mark it as active.
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Work with all your cloud files (Drive, Dropbox, and Slack and Gmail attachments) and documents (Google Docs, Sheets, and Notion) in one place. Try Dokkio (from the makers of PBworks) for free. Now available on the web, Mac, Windows, and as a Chrome extension!

View
 

Using GDAL with Python

This version was saved 12 years, 1 month ago View current version     Page history
Saved by J A Glennon
on October 22, 2009 at 11:02:35 pm
 

Installation Instructions for Windows

Python, GDAL, and Python/GDAL bindings

We need to test and modify this as necessary (22 October 20009)
 
1. Go to http://www.python.org/download/ and install Python 2.6. Python 2.6.x Windows Installer is probably the best one to use. Download, double click the package, and follow the onscreen installation instructions.
 
2. Get GDAL. For Windows, a good place to get it is: http://download.osgeo.org/gdal/win32/1.6/ It'll have a name like: gdalwin32exe160.zip. With that file, when you unzip it, it should be a folder called gdal32-1.6 (or similar) with two folders in it: bin and data. Place the gdal32-1.6 whereever you prefer, but note where it is. You'll need the path name later. I'll place mine at: c:\gdal32-1.6
 
3. You now need to modify your Windows system path and an environment variable. Here's what you do: a) In Windows, find "My Computer", right click your mouse to reveal a context menu, and select "Properties". This will yield a System Properties window. Select the "Advanced" tab, and click the button "Environment Variables". This opens an Environment Variables window. In the user variables area, click on "New" button. This opens a dialog box. Fill in the boxes with the following information:
 
Name: GDAL_DATA
Path: C:\gdalwin32-1.6\data
 
Click OK. Next, in the System Variables section, scroll down until the variable "Path" is highlighted. Click the "Edit" button; it will open a dialog box called Edit System Variable. Leave the variable name "Path" unchanged. The Variable value area is a small box usually overflowing with variables. Make sure not to delete any of those variable names. If you accidentally do, click cancel. Otherwise, after all the existing variables in the small dialog area, add a semicolon, then the path to your gdal bin folder(something like this: ;C:\gdalwin32-1.6\bin). Click the OK button, and it will close that Edit System Variable window. Click the OK button at the bottom of the Environment Variables dialog window. Click the OK button at the bottom of the System Properties' Advanced tab.
 
4. Now, you'll need the bindings to make GDAL and Python work together. Head over to http://pypi.python.org/pypi/GDAL/, look near the bottom of that website, and grab the MS Windows installer for Python 2.6. It will be called something like: GDAL-1.6.1.win32-py2.6.exe. Download, double click on the package, and follow the onscreen installation instructions. 5. you can test to see if it worked by going into a Python shell and typing: from osgeo import ogr. If it doesn't work, you might try restarting your computer.

Comments (0)

You don't have permission to comment on this page.