Tag Archives: QGIS

Install postgis 2.1 and QGIS on ubuntu 15.04

This is tested on a fresh installation of Ubuntu 15.04.

$ sudo apt-get install postgresql postgresql-contrib postgis postgresql-9.4-postgis-2.1 pgadmin3

# add a new user (need to be authenticated as a superuser)
$ sudo -u postgres createuser --superuser mysuperuser

# Set password for created user
$ sudo -u postgres psql postgres
postgres=# \password mysuperuser

Enter new password:mysuperuserpassword
Enter it again:

# create password for user postgre
$ sudo su
$ su - postgres

Now you can access the PostgreSQL prompt with the command:
$ psql

And then change the password for postgres role by typing :
$ \password postgres
Enter new password: postgres

Continue reading

Georeferencing a scanned map with QGIS

Some times you need to have vector data that haven’t been digitized yet, like some old maps with building footprints or street lines. We can scan a map, georeference it in QGIS, and then digitize those features to create new vector layers. Scanned maps don’t contain spatial reference information, so to digitize we need to reference the raster in a specific coordinate system.

In this example we will georeference a map of the city of Barcelona with the layout of the old medieval walls (XIII-XIV) with QGIS.

Continue reading