[QGIS Commit] r10870 - trunk/qgis/doc

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Jun 1 09:24:42 EDT 2009


Author: dassau
Date: 2009-06-01 09:24:42 -0400 (Mon, 01 Jun 2009)
New Revision: 10870

Modified:
   trunk/qgis/doc/INSTALL.t2t
Log:
added grass/qgis build instruction for ecw and mrsid written by Giovanni Manghi


Modified: trunk/qgis/doc/INSTALL.t2t
===================================================================
--- trunk/qgis/doc/INSTALL.t2t	2009-06-01 13:23:31 UTC (rev 10869)
+++ trunk/qgis/doc/INSTALL.t2t	2009-06-01 13:24:42 UTC (rev 10870)
@@ -1009,6 +1009,304 @@
 If all has worked properly the QGIS application should start up and appear
 on your screen.
 
+
+== A practical case: Building QGIS and GRASS from source on Ubuntu with ECW and MrSID formats support ==
+
+The following procedure has been tested on Ubuntu 8.04, 8.10 and 9.04 32bit. If you want 
+to use different versions of the software (gdal, grass, qgis), just make the 
+necessary adjustments to the following code. This guide assumes that you don't have 
+installed any previous version of gdal, grass and qgis.
+
+===  Step 1: install base packages === 
+
+First you need to install the necessary packages required to download the source 
+code and compile it. Open the terminal and issue the following command:
+
+``` 
+sudo apt-get install build-essential g++ subversion
+```
+
+=== Step 2: compile and install the ecw libraries ===
+
+Go to the ERDAS web site http://www.erdas.com/ and follow the links
+"'''products --> ECW JPEG2000 Codec SDK --> downloads'''" 
+then download the "'''Image Compression SDK Source Code 3.3'''" (you'll need to make a registration 
+and accept a license).
+
+Uncompress the arquive in a proper location (this guide assumes 
+that all the downloaded source code will be placed in the user home) 
+and the enter the newly created folder
+
+``` 
+cd /libecwj2-3.3
+```
+
+Compile the code with the standard commands
+
+``` 
+./configure
+```
+
+then
+
+``` 
+make
+```
+
+then
+
+``` 
+sudo make install
+```
+
+leave the folder 
+
+``` 
+cd ..
+```
+
+=== Step 3: download the MrSID binaries ===
+
+Go to the LIZARDTECH web site http://www.lizardtech.com/ and follow the links
+"'''download --> Developer SDKs'''", 
+then download the "'''GeoExpress SDK for Linux (x86) - gcc 4.1 32-bit'''"
+(you'll need to make a registration and accept a license).
+
+Uncompress the downloaded file. The resulting directory name should be similar to "Geo_DSDK-7.0.0.2167"
+
+=== Step 4: compile and install the gdal libraries ===
+
+Download the latest gdal source code
+
+``` 
+svn checkout https://svn.osgeo.org/gdal/trunk/gdal gdal
+```
+
+then copy a few files from the MrSID binaries folder to the folder with the gdal source code
+('''replace "USERNAME" with your actual account username''')
+
+``` 
+cp /home/USERNAME/Geo_DSDK-7.0.0.2167/include/*.* /home/USERNAME/gdal/frmts/mrsid/
+```
+
+enter the gdal source code folder
+
+``` 
+cd /gdal
+```
+
+and run configure with a few specific parameters
+
+``` 
+./configure --without-grass --with-mrsid=../Geo_DSDK-7.0.0.2167 --without-jp2mrsid
+``` 
+
+at the end of the configuration process you should read something like
+
+``` 
+...
+GRASS support:             no
+...
+...
+...
+ECW support:               yes
+MrSID support              yes			
+...
+```
+
+then compile normally
+
+``` 
+make
+```
+
+and
+
+``` 
+sudo make install
+```
+
+finish the process by creating the necessary links to the most recent shared libraries
+
+``` 
+sudo ldconfig
+```
+
+at this point you may want to check if gdal was compiled correctly with MrSID and ECW
+support by issuing one (or both) of the following commands
+
+``` 
+gdalinfo --formats | grep 'ECW'
+```
+
+``` 
+gdalinfo --formats | grep 'SID'
+```
+
+leave the folder 
+
+``` 
+cd ..
+```
+
+=== Step 5: compile and install GRASS ===
+
+Before downloading and compile GRASS source code you need to install a few
+other libraries and programs. We can do this trough apt
+
+``` 
+sudo apt-get install flex bison libreadline5-dev libncurses5-dev lesstif2-dev debhelper dpatch libtiff4-dev \
+tcl8.4-dev tk8.4-dev fftw-dev xlibmesa-gl-dev libfreetype6-dev autoconf2.13 autotools-dev \
+libgdal1-dev proj libjpeg62-dev libpng12-dev libpq-dev unixodbc-dev doxygen fakeroot cmake \
+python-dev python-qt4-common python-qt4-dev python-sip4 python2.5-dev sip4 libglew1.5-dev libxmu6 \
+libqt4-dev libgsl0-dev python-qt4 swig python-wxversion python-wxgtk2.8 libwxgtk2.8-0 libwxbase2.8-0 tcl8.4-dev \
+tk8.4-dev tk8.4 libfftw3-dev libfftw3-3
+```
+
+At this point we can get the GRASS source code: you may want to download it
+trough svn or maybe you want just to download the latest available source code arquive.
+For example the GRASS 6.4rc4 is available at http://grass.itc.it/grass64/source/grass-6.4.0RC4.tar.gz
+
+Uncompress the arquive, enter the newly created folder and run configure with a few specific parameters
+
+``` 
+./configure --with-tcltk-includes=/usr/include/tcl8.4 --with-proj-share=/usr/share/proj --with-gdal=/usr/local/bin/gdal-config --with-python=/usr/bin/python2.5-config
+```
+
+then as usual (it will take a while)
+
+``` 
+make
+```
+
+and
+
+``` 
+sudo make install
+```
+
+leave the folder 
+
+``` 
+cd ..
+```
+
+you have now compiled and installed GRASS (also with the new wxpyhton interface) so you
+may want to give it a try
+
+``` 
+grass64 -wxpython
+```
+
+=== Step 6: compile and install the GDAL-GRASS libraries ===
+
+Create a plain text file named "grass.conf" inside the folder "/etc/ld.so.conf.d"
+
+``` 
+sudo gedit /etc/ld.so.conf.d/grass.conf
+```
+
+and add the following line
+
+``` 
+/usr/local/grass-6.4.0RC4/lib/
+```
+
+save and exit.
+
+Download the latest version of the gdal-grass library (gdal-grass-1.4.3.tar.gz) from
+http://download.osgeo.org/gdal/
+
+uncompress the arquive and enter the newly created folder
+
+``` 
+cd /gdal-grass-1.4.3
+```
+
+run configure
+
+``` 
+./configure --with-grass=/usr/local/grass-6.4.0RC4
+```
+
+then as usual
+
+``` 
+make
+```
+
+and
+
+``` 
+sudo make install
+```
+
+and finish the process by creating the necessary links to the most recent shared libraries
+
+``` 
+sudo ldconfig
+```
+
+leave the folder 
+
+``` 
+cd ..
+```
+
+=== Step 6: compile and install QGIS ===
+
+As for GRASS you can obtain the QGIS source code from different sources,
+for instance from svn or just by downloading one of the source code arquives available
+at http://www.qgis.org/download/sources.html
+
+For example download the QGIS 1.1.0 source code here http://download.osgeo.org/qgis/src/qgis_1.1.0.tar.gz
+
+uncompress the arquive and enter the newly created folder
+
+``` 
+cd /qgis_1.1.0
+```
+
+then run ccmake
+
+``` 
+ccmake .
+```
+
+press the "c" key, then when the option list will appear we need to manually
+configure the "GRASS_PREFIX" parameter. Scroll down until the "GRASS_PREFIX" will appear, 
+press enter and manually set it to
+
+``` 
+/usr/local/grass-6.4.0RC4
+```
+
+then press enter again.
+
+Press the "c" again and the option "Press [g] to generate and exit" will appear.
+Press the "g" key to generate and exit.
+
+then as usual (it will take a while)
+
+``` 
+make
+```
+
+and
+
+``` 
+sudo make install
+```
+
+At the end of the process you should have QGIS and GRASS working with MrSID and ECW
+raster format support.
+
+To run QGIS just use this command 
+
+``` 
+qgis
+```
+
 % -----------------------------------------------------------------------------
 % ----Please leave this break marker here for clarity - it wont be rendered ---
 % -----------------------------------------------------------------------------



More information about the QGIS-commit mailing list