pyGTiff

Developed at the Michigan Tech Research Institute (MTRI), pyGTiff is a convenience class for handling geotiffs (and potentially other formats) through GDAL in Python. This project is intended to facilitate scientific computing of geospatial information by making GDAL easier to use for scientists who are not primarily programmers.

Features:

Full Documentation and source can be found here.

Installation

Prerequisites

You will need GDAL built with python bindings to use the pyGTiff module. To install the advanced features you will need the development headers as well (gdal-dev)

On linux you can find and install these libraries through synaptic or the software center.

On windows the easiest method is to install Osgeo which pyGTiff is currently known to work with the 32-bit version.

More options are available here.

Getting the Code

Source distribution:
Development Code

Alternatively you can get the code directly from the mercurial repository.

If you don't have mercurial you can install it:

sudo apt-get install mercurial

then get the code, you can put it wherever you like but this example will assume a folder named installs in your home directory (make it first if it doesn't exist):

cd ~/installs
hg clone https://bitbucket.org/rsawtell/pygtiff
cd pyGTiff_dev

Building

Once you have the code downloaded and extracted if necessary, open a terminal and cd to the directory you placed the code.

On linux, you will probably need to use sudo to install.

On windows, make sure your the python .exe file is on your system path, or use the full path to the executable (ex: C:\python27\python.exe). If you are using OSGeo4W, this should be set up for you already when you run the OSGeo4W shell (typically from a desktop shortcut).

python setup.py build --noc
sudo python setup.py install --noc

Additional feature support

The previous install does not include all of the features pyTiff has to offer, but is easier to install.

If you want the full version, you will need the GDAL development libraries.

On Linux you can get this through synaptic or the software center.

The best method on Windows is again with OSGeo4W, you can exclude the sudo since it will get installed to your OSGeo4W installation directory.

On Windows you will also need need Visual Studio 2008 to compile the python extensions.

python setup.py build
sudo python setup.py install

Windows Installer

First install 32-bit OSGeo4W

When that is complete, download and run the Windows Installer.

After the installer has asked about which users to install for, it will ask you to select the python installation to install to. You should see "Python from another location" with a red X and a dropdown arrow to the left. Click on the dropdown arrow and select "Will be installed on local hard drive"

An entry field labeled "Provide an alternate Python location" should appear, change that to read "C:\OSGeo4W\apps\Python27" then click Next.

You can also use the MSI file to uninstall later, which you should do if you are upgrading to a newer version of pyGTiff.