Install native GDAL on Windows for 32/64-bit versions, currently Python 2.6 to Python 3.3:
So far, I'm impressed with the quality of this Python distribution for Windows. Not only is it a recent version of GDAL (presently 1.9.2), but no external libraries need to be added or managed. (It includes gdal19.dll, etc. and the
GDAL_DATA directory). You can use PythonWin or whatever else you install on your system.
Two drawbacks that I have noticed with this particular package:
- It does not support the
PostgreSQL driver for PostGIS. If you don't need it, then this isn't a problem.
- It includes the GDAL data directory, but it does not set the
GDAL_DATA environment variable to it. Perhaps you have this variable set by another installation (e.g., the Windows PostGIS installer does this), which is OK. But if
GDAL_DATA is not set, there could be some issues with the OGR module.
Here is a workaround to get
GDAL_DATA working with the package if it is broken. Find the top-level package Python source file, e.g.
C:\Python27\Lib\site-packages\osgeo\__init__.py and add:
# __init__ for osgeo package.
if 'GDAL_DATA' not in os.environ:
os.environ['GDAL_DATA'] = os.path.join(os.path.dirname(__file__), 'data', 'gdal')