= GRASS = The GRASS support can be added to GDAL in two ways: * as a built-in GRASS driver * as a loadable GRASS driver plugin '''Note, following instructions apply to Linux and other environments where GNU autotools are available (autoconf, automake, make).''' == Prerequisites == * Download and install [http://grass.itc.it/ GRASS] together with development files (headers and libraries). The easiest option is to use binary packages prepared for your Linux distribution. * Download latest [wiki:DownloadSource#PackagedSource stable] or [wiki:DownloadSource#Subversion development] version of GDAL sources: {{{ tar -zxf gdal-1.4.1.tar.gz cd gdal-1.4.1 }}} == Building GDAL with built-in GRASS driver == * Configure GDAL sources '''with''' GRASS support included: {{{ ./configure --with-grass=/usr/local/grass }}} and after ./configure finishes its job, you should see the GRASS driver enabled in the summary, like here: {{{ GDAL is now configured for i686-pc-linux-gnu ... GRASS support: grass57+ ... }}} * Build and install GDAL: {{{ make make install }}} running last step with root privileges. * Now, you can verify if GRASS support is enabled correctly: {{{ ./gdalinfo --formats | grep GRASS GRASS (ro): GRASS Database Rasters (5.7+) ./ogrinfo --formats | grep GRASS -> "GRASS" (readonly) }}} == Building GDAL and GRASS driver plugin == * 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 make install }}} === Build GRASS plugin === * [http://download.osgeo.org/gdal/ Download] latest sources of GRASS plugin where the package file name is gdal-grass-X.Y.Z.tar.gz, ie. [http://download.osgeo.org/gdal/gdal-grass-1.4.1.tar.gz gdal-grass-1.4.1.tar.gz]. Unpack the source package: {{{ tar -zxf gdal-grass-1.4.1.tar.gz cd gdal-grass-1.4.1 }}} * 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/grass }}} * Now, the plugin is ready to build and install: {{{ make make install }}} The last step needs root privileges.