next up previous contents
Next: Qt Up: Building and Installing QGIS Previous: GRASS   Contents

GDAL/OGR

The GDAL and OGR libraries provide support for raster and vector data formats. QGIS makes use of both of these libraries (which come bundled in one distribution).

Note: A Linux binary of GDAL is available at http://www.remotesensing.org/gdal. If you choose to install the binary you will also need to download and unpack the source tree since QGIS needs the header files in order to compile.

To install GDAL/OGR from source:

  1. Download the GDAL distribution from http://www.remotesensing.org/gdal. You should use version 1.1.9 or higher. Versions prior to 1.1.9 contained a bug that caused problems when a null feature was encountered. If you want to build vector support for GRASS, you must use GDAL 1.2.3.

  2. Untar the distribution
        tar xfvz /../path/../gdal-x.x.x.tar.gz
    

  3. Change to the gdal-x.x.x subdirectory that was created by step 2
        cd gdal-x.x.x
    

  4. Configure GDAL
        ./configure
    
    or if you want GRASS support
        ./configure --with-grass=<full path to grass install>
    
    Depending on the GDAL version you are building, it may be necessary to specify -without-ogdi when running configure if you don't have the OGDI libary avaiable on your system.

  5. Build and install GDAL:
        make
        su
        make install
    

  6. In order to run GDAL after installing it is necessary for the shared library to be findable. This can often be accomplished by setting LD_LIBRARY_PATH to include /usr/local/lib. On Linux, you can add /usr/local/lib (or whatever path you used for installing GDAL) to /etc/ld.so.conf and run ldconfig as root.

  7. Make sure that gdal-config (found in the bin subdirectory where GDAL was installed) is included in the PATH. If necessary, add the path to gdal-config to the PATH environment variable.
        export PATH=/../path/../gdal-config:$PATH
    

  8. Check the install by running:
        gdal-config --prefix
    

If you've had problems during the installation, refer to this manual, where the whole process is described with some more detail: http://www.remotesensing.org/gdal/gdal_building.html


next up previous contents
Next: Qt Up: Building and Installing QGIS Previous: GRASS   Contents
Gary Sherman 2004-10-01