Blog

Viewing posts for the category QGIS

How to load a QGIS project in python

Posted by: Gavin Fleming | in QGIS | 6 years, 1 month ago | Comments

Today in a project we are working on we wanted to load a QGIS project. It takes  surprisingly few lines of code to make a small standalone application that loads a project and then shows it as a map in a window like this:

A quick hack to select all multipart features in QGIS

Posted by: Gavin Fleming | in FOSSGIS, QGIS | 6 years, 1 month ago | Comments

Today we wanted to find all the multipart features in this layer:

Setting up a Fedora 21 QGIS Workstation

Posted by: Gavin Fleming | in FOSSGIS, QGIS, Uncategorised | 6 years, 2 months ago | Comments

I have been a long time Ubuntu user (I have actually been using it since Ubuntu 4.10 'Warty Warthog') - the first official release. The advent of Ubuntu saw an end to my distro hopping whilst looking for the 'perfect linux distro'.

How to build and debug QGIS with QtCreator

Posted by: Gavin Fleming | in QGIS | 6 years, 3 months ago | Comments

Here is how I build QGIS with QtCreator under ubuntu 14.04

Gary Sherman wins the Sol Katz award

Posted by: Gavin Fleming | in QGIS | 6 years, 5 months ago | Comments

This year Gary Sherman won the annual Sol Katz award. To quote the OSGEO page about the award:

WMS Legend Plugin for Leaflet

Posted by: Gavin Fleming | in Leaflet, QGIS | 6 years, 6 months ago | Comments

This weekend I was updating our map gallery at http://maps.kartoza.com and I wanted to have WMS legends in my maps. The maps are mostly generated using QGIS server which also produces a nice looking graphic for its getLegendGraphic requests. Since Leaflet does not seem have a legend control out of the box, I wrote a small leaflet plugin to do it.

How to quickly transform a bounding box from one CRS to another using QGIS

Posted by: Gavin Fleming | in FOSSGIS, QGIS | 6 years, 7 months ago | Comments

Today I needed to convert a bounding box for a tilemill project that I want to bring into QGIS as a tile layer (more on that in a future post if I get it to work...).  I needed to convert a bounding box from EPSG:4326 ('Geographic') coordinates to EPSG:3857 (Spherical Mercator). Fortunately it is a fairly trivial process if you don't mind writing a few lines of python in the QGIS python console:

box = QgsRectangle(-19.6875,-37.9962,59.0625,37.4400)
source_crs = QgsCoordinateReferenceSystem(4326)
dest_crs = QgsCoordinateReferenceSystem(3857)
transform = QgsCoordinateTransform(source_crs, dest_crs)
new_box = transform.transformBoundingBox(box)
new_box.toString()
u'-2191602.4749925746582448,-4578889.0142234507948160 : 6574807.4249777207151055,4500615.8633687794208527'

 

Running QGIS desktop in a docker container

Posted by: Gavin Fleming | in QGIS | 6 years, 7 months ago | Comments

I love using docker - I have been tracking and learning docker since soon after it was announced and believe it is going to be a real game changer. I've been playing around with the different things one can do in a docker container and of course it is only natural that a 'QGIS guy' such as myself would start to think about using docker with QGIS. QGIS server in a docker container seems like a natural fit, but how about QGIS Desktop? Last night Richard Duivenvoorde and I were sitting around drinking tea and we thought we would give it a quick go - in fact it only took about half an hour to get something working....

Have any questions? Contact us.
We would love to hear from you!
Subscribe to our Mailing list (spam-free, industry-relevant occasional emails)

Subscribe to our mailing list

* indicates required