Image

Quantum GIS

Quantum GIS (QGIS) is a user friendly Open Source Geographic Information System (GIS) that runs on Linux, Unix, Mac OSX, and Windows. QGIS supports vector, raster, and database formats. QGIS is licensed under the GNU General Public License. QGIS lets you browse and create map data on your computer. It supports many common spatial data formats (e.g. ESRI ShapeFile, geotiff). QGIS supports plugins to do things like display tracks from your GPS. QGIS is Open Source software and its free of cost (download here). We welcome contributions from our user community in the form of code contributions, bug fixes, bug reports, contributed documentation, advocacy and supporting other users on our mailing lists and forums. Financial contributions are also welcome.
Image

Newsflash

Quantum GIS Version 0.11.0 has been released. It is available in source form, and as binary executables for Microsoft Windows, Mac OS X, and GNU/Linux. All versions can be obtained from our download page. If the version for your platform is not available please check back in a day or two as some packages are still being built.
 
 
Building QGIS on Ubuntu Step by Step

This howto walks you through the process of installing QGIS dependencies and building QGIS from source in a (hopefully) clear and step by step manner.

Intro

I have updated these notes for ubuntu breezy, even though its still in preview release mode, you are better off using breezy as the packages are much more up to date.

These notes are for if you want to build QGIS from source. One of the major aims here is to show how this can be done using binary packages for all dependencies - building only the core QGIS stuff from source. Currently the gdal grass raster driver needs to be built from source too - Ill revise these notes when a suitable package is available. I prefer this approach because it means we can leave the business of managing system packages to apt and only concern ourselves with coding QGIS! Note they are still under construction...and are continually evolving.

  1. Intro
  2. QGIS Specific Requirements
    1. Install package dependencies.
    2. Setup ccache
    3. Make sure the correct version of automake is being used
  3. GRASS Specific Steps
    1. Install GRASS
    2. Install GRASS raster driver for gdal
  4. Starting the compile

QGIS Specific Requirements

Need to be running breezy...

The packages qgis depends on to build are available in the "universe" component of Ubuntu. This is not activated by default, so you need to activate it:

  1. Edit your /etc/apt/sources.list file.

  2. Uncomment the all the lines starting with "deb"

Now update your local sources database:

 
sudo apt-get update

Install package dependencies.

Even if you dont plan to code using kdevelop, its worth installing first because it will make sure you have the dependencies for a useable c++ compilation environment. Not all these packages are strictly needed for QGIS to build, but I find them convenient to have. If you are short on disk space or bandwidth, you may wish to be a little more selective. If you are unsure, just install them all, they cant cause any harm.

 
sudo apt-get install kdevelop3 autoconf2.13 
autobook autoconf-archive gnu-standards 
libqt3-mt-dev qt3-doc kdbg libarts1-dev 
kdelibs4-doc htdig doxygen kdoc 
sgmltools-lite linuxdoc-tools a2ps gv 
qt3-designer qt3-dev-tools kbabel graphviz 
c-cpp-reference g++ libtool flex bison 
automake1.8 checkinstall ccache libtool proj 
sqlite3 libsqlite3-dev libsqlite3-0 gsl-bin 
libgsl0 libgsl0-dev cvs

/!\ Note: This will prompt to install a whole heap of additional packages....go ahead its ok.

Now you can install all the packages qgis requires to build:

 
sudo apt-get build-dep qgis

Setup ccache

You should also setup ccache to speed up compile times:

 
cd /usr/local/bin
sudo ln -s /usr/bin/ccache gcc
sudo ln -s /usr/bin/ccache g++

Make sure the correct version of automake is being used

/!\ NOTE: If you installed kdevelop using the step above, ubuntu will have installed automake-1.4. This causes a problem when running the autogen.sh command below as it picks up the wrong copy of aclocal and automake. To circumvent this while still keeping both installed on your system do the following:

 
sudo update-alternatives --config automake

Which will present you with something like:

 
There are 4 alternatives which provide `automake'.
 
  Selection    Alternative
-----------------------------------------------
      1        /usr/bin/automake-1.6
      2        /usr/bin/automake-1.8
*+    3        /usr/bin/automake-1.4
      4        /usr/bin/automake-1.9
 
Press enter to keep the default[*], or type selection number: 2
Using `/usr/bin/automake-1.8' to provide `automake'.
 

GRASS Specific Steps

Install GRASS

/!\ If you don't need to build with GRASS support, you can skip this section.

Now you can install grass from breezy:

 
sudo apt-get install grass libgrass-dev

Install GRASS raster driver for gdal

The apt package for this is currently broken, se we have to build it from source :-(

 
cd ~/installers
wget http://www.gdal.org/dl/gdal-grass-1.2.3.tar.gz
cd ~/src
tar xvfz ~/installers/gdal-grass-1.2.3.tar.gz
cd gdal-grass-1.2.3/
sudo apt-get install libgrass-dev
./configure --with-grass=/usr/lib/grass
make
sudo make install
echo "export GDAL_DRIVER_PATH=/usr/lib" >> ~/.bashrc
source ~/.bashrc

/!\ NOTE: You will need to log in again for the GDAL_DRIVER_PATH to be picked up in all your shells!

Starting the compile

NOTE You will need to follow the instructions in the dowload page to get the source code downloaded first!

The qt files are not in the expected place, so you need to tell configure where to look for them. Or you can export QTDIR=/usr/share/qt3.

Now you can proceed to the initial configure step:

 
./autogen.sh --enable-debug --prefix=/usr 
--with-qtdir=/usr/share/qt3 
--with-grass=/usr/lib/grass

At the end of the autogen / configure process above you should see output like below, indicating that qgis is going to be built with all its bells & whistles...

 
==========================================
qgis 0.6.0devel22
------------------------------------------
GDAL/OGR      : yes (Version 1.2.6)
GEOS          : yes (Version 2.0.1)
PostgreSQL    : yes (Version 7.4.7)
GRASS         : yes <-- may be no if you skipped grass step above!
SPIT          : yes
Georeferencer : yes
GPS/GPX       : yes
PROJ4         : yes
SQLITE3       : yes
 
Debug         : yes
Plugin dir    : ${exec_prefix}/lib/qgis
 
The binary will be installed in /usr/bin
 
The build is using Qt in /usr/share/qt3
------------------------------------------
Configure finished, type 'make' to build.

Now we go on to the compilation step. I like to time the build so I can get an idea of how long it takes in general. THe first time you build will take substantially longer as ccache will not receive many hits. Subsequent builds should be much faster!

 
echo `date` > /tmp/qgis_compile.txt ; make ; echo `date` >> /tmp/qgis_compile.txt

Now install as a package for easy removal later:

 
sudo ./doCheckInstall.sh

Using doCheckinstall.sh will do the equivalent of make install, but it will also make a debian package of QGIS, making it easy to compile on one machine and install on many...

---

 

Micro Resources

Bandwidth for QGIS downloads is sponsored by Micro Resources - Find out more about our Web Site and MapServer hosting plans for your site.
Joomla Template by Joomlashack
Joomla Templates by JoomlaShack Joomla Templates by Compass Design