GRASS
Note, following instructions apply to Linux and other environments where GNU autotools are available (autoconf, automake, make).
The right order of steps to perform is, briefly:
- build GDAL without GRASS support
- build GRASS pointing to your new GDAL
- add your GRASS library path to /etc/ld.so.conf and run ldconfig
- build GDAL's GRASS plugin OR completely rebuild GDAL with GRASS support. (building the plugin is easier; do that)
Prerequisites
- Download and install GRASS source. The easiest option is to use binary packages prepared for your operating system.
- Download latest stable or development version of GDAL sources:
tar -zxf gdal-1.5.0.tar.gz cd gdal-1.5.0
Building GDAL and GRASS driver plugin
First build GDAL without GRASS
- Configure GDAL sources without GRASS support:
./configure --without-grass
and then you should see the built-in GRASS driver disabled (no) in the summary:
GDAL is now configured for i686-pc-linux-gnu ... GRASS support: no ...
- Build and install GDAL:
make
The install step needs root privileges:
sudo make install
Next build GRASS
- ./configure GRASS --with-gdal=/path/to/gdal-config
Finally build GDAL's GRASS plugin
- Download latest sources of GRASS plugin where the package file name is gdal-grass-X.Y.Z.tar.gz, ie. gdal-grass-1.4.3.tar.gz (1.4.3 plugin is fine with any 1.4.x GDAL). Unpack the source package:
tar -zxf gdal-grass-1.4.3.tar.gz cd gdal-grass-1.4.3
- Configure the plugin providing paths to gdal-config program and GRASS files as follows:
./configure --with-gdal=/usr/local/bin/gdal-config --with-grass=/usr/local/grass6
- Now, the plugin is ready to build and install:
make
The install step needs root privileges:
sudo make install
Confirm
gdalinfo --formats | grep GRASS ogrinfo --formats | grep GRASS
should both show some information on the GRASS driver.
Open Tickets
No results
Last modified
15 years ago
Last modified on May 24, 2009, 11:00:07 PM
Note:
See TracWiki
for help on using the wiki.