Getting Started

Installing Q-Rap


Q-Rap does not currently have binary install options and subsequently needs to be compiled from source. If you do not know what "compile" means, do not fear nor despair; this Getting Started section will guide through the process of getting Q-Rap installed. The steps required are:
  1. Get Supported Operating System Platform.
  2. Install the base software Q-Rap depends on.
  3. Obtain the Q-Rap source code.
  4. Compile Q-Rap.
  5. Create and setup the Q-Rap database.

1. Get Supported Operating System Platform

Currently Q-Rap is developed and supported only for Ubuntu version 16.04 (Xenial Xerus). The development follows the Long Term Support updates of Ubuntu and will remain so as long as resource constraints dictate. However, anyone is free to compile it on their own chosen platform, including Microsoft Windows. As with any Open Source project, contribution in this or any other regard will gladly be accepted. Subscribe to the qrap-update mailing list to receive any updates regarding new releases.

Installing Ubuntu

The long term support (LTS) Ubuntu that we support is Xenial Xerus (16.04). The instructions on how to obtain Ubuntu and install it, can be found on the following page:

http://releases.ubuntu.com/16.04/


2. Install the base software Q-Rap depends on.

Install Synaptic Package Manager

To install Synaptic you will need to open a terminal. Click on the 'Ubuntu' bottom on the top left corner of your screen and search for 'Terminal'. Open the package and on the command line type:

      sudo apt-get install synaptic


Configure Additional QGIS Repositories

For up to date information on the installation of the latest QGIS version visit the QGIS website: http://www.qgis.org/en/site/.

"Repositories" refer to location where software packages and source code are stored on the Internet.  In order to compile Q-Rap, the QGIS 2.8 is requiredThe QGIS additional repository locations needs to be registered with Synaptic in order to gain access to them.  In Synaptic, follow the steps shown below:

  • Select the Settings->Repositories menu
  • Select the Other Software” tab, (the second tab) on the "Software Sources" window that opens.
  • Click the "Add..." button, and then enter the APT line shown below in the dialogue window that opens, confirming with the "Enter" key:
            deb http://qgis.org/debian-ltr xenial main
  • Also add the source or development repository below, using the same procedure as the previous step:
            deb-src http://qgis.org/debian-ltr xenial main
  • Ensure that the tick-boxes next to the newly added repositories are checked.
  • Close the "Software Sources" window when done.
  • Back on the main Synaptic window, click the "Reload" button on the top tool bar; this will force Synaptic to refresh its repository data.
  • If an GPG error occurs for the QGIS repositories added stating that signatures could not be verified, one needs to add the public key: Do this by entering the command given below in separate command line console (note that the key value to enter should be the same as reported by the error message):
    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 3FF5FFCAD71472C4
  • After adding the public key, click the Synaptic "Reload" button again, the error message should not appear again.
For latest information about QGIS packages an public keys, see https://www.qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu.


Install All Required Software and Libraries

  • In Synaptic Package Manager, search and install all listed packages.
  • Ensure that you use the Synaptic "Search" function, not the default "Quick Search".
  • Ensure that the repository data is up to date by clicking the "Reload" button in the Synaptic tool bar menu before installing new packages.
  • Some packages listed below may already be installed on the system, but might be out of date.  By selecting "Mark All Upgrades" in the Synaptic tool bar menu, these packages will be shown with a green "up arrow" icon.  This signifies that the package will be upgraded when applying changes.  Packages that are out of date and not marked for upgrade is shown with a gray exclamation icon.  Individual packages can be marked for upgrade by right clicking and selecting "Mark for Upgrade"
  • Once all packages are marked for install or upgrade, click on the "Apply" button in the Synaptic tool bar menu.  Your Internet link speed will determine the length of the coffee break you can take at this point.
Software/library Packages to install:
  • qgis (version 2.8)
  • libqgis-dev (ensure that you have only one version installed)
  • libgdal-dev (ensure that you have only version installed)
  • libspatialindex-dev
  • libqca2-dev
  • libgeos++-dev
  • g++-5
  • cpp-5
  • cmake
  • subversion
  • libpoco-dev
  • qt4-designer
  • qt4-dev-tools
  • libqt4-core
  • libqt4-dev
  • libqt4-sql-psql
  • libqwt5-qt4-dev
  • pyqt4-dev-tools
  • libpqxx-dev (NB: version 4)
  • postgresql (version 9.5)
  • postgresql-server-dev-9.5
  • postgis
  • postgresql-9.5-postgis
  • libeigen3-dev
  • libfann-dev

The following packages are optional:

  • postgresql-doc
  • tora (database interface tool)


3. Obtain the Q-Rap Source Code

As already stated, the Q-Rap software/source code is not yet available as a package or binary.  The source code and other files needs to be checked-out directly from the development version control system repository.  For convenience (if you do not have a high bandwidth), there  are also zip files available containing a snapshot of the development repository.  The SVN check-out option is however strongly suggested as this is guaranteed to be the latest version, the zip snapshots will most likely be lagging somewhat. The SVN checkout also contains some sample data.

Direct SVN Checkout Option: (preferred as it is more lightly to contain the latest version)

  • Open a command line console. (Search for "Terminal" at the Dash Home on the top-left corner of your screen to find and open a command line terminal.)
  • Ensure that you are in your home directory by entering the following command:
cd ~
  • To retrieve the files from the svn server into your local current directory, enter the following command in the command line console:
svn checkout http://svn.code.sf.net/p/qrap/code/ qrap
  • Wait for file transfer from the Q-Rap Subversion server to your PC to complete, this will take some time.  Once done, the source code should be in a directory called "qrap".

 

Zip File Download Option:

  • Browse to the following URL and download qrap.tar.gz:
  • Open a command line console. (Search for "Terminal" at the Dash Home on the top-left corner of your screen to open a command line terminal.)
  • Ensure that you are in your home directory by entering the following command:
cd ~
  • Unzip the file to you home directory by entering the following command in the command line interface:
tar -xzf qrap.tar.gz


4. Compile Q-Rap

  • Open a command line console (Applications->Accessories->Terminal)
  • Change to the directory containing the source code: if the steps where followed as per section 3 above, the directory should be "qrap" located in your home directory.  The command below will then take you there:
cd ~/qrap
  • Confirm that you are in the correct directory by entering the command below and verify that it is the expected directory "/home/YOUR_USERNAME/qrap".
pwd
  • The make configuration file that will be used for the actual compile process needs to be configured first; this an automated process started by issuing the command below:
cmake ./
  • Inspect the output of the cmake command. If the following messages is seen, it can be safely ignored. They are known non-critical issues: "-- SIP is required in version 4.5 or later!" or "-- Python bindings disabled due dependency problems!".  Any other warning or error message has to be resolved first in order successfully compile Q-Rap.
  • To start the compile process, enter the command below.
make
  • Inspect the output of the make command; if all went well, there should be no warning or error messages with a final output line stating "[100%] Built target qrapplugin"
  • At this point the binary executable is available but still needs to be installed on the system, enter the command below. You will be prompted for a password directly after entering it.  The password to use is the normal login password for the current user. The user executing this command must have root (administrator) rights for this install step to be successful.
sudo make install

5. Create and setup the Q-Rap database

This section will be expanded shortly, for now consult the manual for help with setting up your database and for general Q-Rap usage.


Note:

If you are based in South Africa and have the System Setting, Language Support, Regional setting as "English(South Africa)", rather change it to "English (United Kingdom)" or English (United States). PostgreSQL does not handle the decimal comma very well and prefer the decimal point instead.   


Comments