Installing QGIS 3 on Ubuntu 16.04

QGIS 3.0 is out and from the blogs and tweets, it looks awesome. Some one asked me how to install QGIS 3.0 on Ubuntu 16.04, so here are the steps.

First, if you have previous version of qGIS, lets delete that

sudo apt-get autoremove qgis

sudo apt-get --purge remove qgis python-qgis qgis-plugin-grass

sudo apt-get autoremove

Now edit /etc/apt/sources.list by using the following command

sudo vi /etc/apt/sources.list

Note: Sudo is required because normal users do not have rights in /etc/apt/ folder.

Now this is where is trick is, instead of adding  debian or ubunutgis repositories add ubunutgis-nightly-release,  so add the following two lines in source. list

deb https://qgis.org/ubuntugis-nightly-release xenial main
deb-src https://qgis.org/ubuntugis-nightly-release xenial main

Rest is simple, first update

sudo apt-get update

and then install

sudo apt-get install qgis python-qgis qgis-plugin-grass saga

Thats it.

Some of the dependencies will not be there if we use ubuntugis-nightly-release repository reference.

Advertisements

Two interesting plugins for QGIS

QGIS has made its mark in FOSS4G and third party plugins make it more and more attractive. I will introduce two more plugins today which could also be useful  for you.

MultiQml

If you have many layers that require a similar style, you have to assign style for each layer one by one. Not any more, MultiQml can perform this tedious task for you.

First load all required layers. Second,  style any one layer and save the styling information as ‘QGIS Layer Style File’ below. You can use ‘Layer properties’ form to save styles (see below).

Screenshot from 2016-02-17 16:04:54

Start MultiQml from menu, perform the following

  1. Raster / Vector layer type
  2. Select all layers
  3. Apply style

Screenshot from 2016-02-17 16:09:32

The final operation will apply the same style (theme) to all the layers (in one go, saves a lot of time :)).

Table manager

In QGIS, if you want to change the attribute of shape file it is not possible directly. For example, you want to change the upper case character in field ‘Name’ to ‘name’, you cannot do that.

Now some one might think, why would I want to change the attributes from upper to lower characters. Well …. actually you don’t need to until you wan to upload this shape file to PostgreSQL/Postgis. If you have upper case character as attribute names (or as field names in database terms), you cannot access them (in a query) like normal attributes. For example a select on country shape file with upper character  (below) will return an error

select * from country where Name = ‘Sweden’;

one way to to correct the above query is to use quotes in field name

select * from country where “Name” = ‘Sweden’;

OR use ‘Table manager’ plugin to edit the attribute names. Start ‘Time Manager’ and it will pick the active layer and will show you all the attributes (below)

Screenshot from 2016-02-17 16:32:19

You can rename a attribute, change attribute order, clone an attribute, insert an attribute and delete an attribute.