Page 3 of 87 (1724 posts)

  • talks about »


Last update:
Sat Aug 27 19:25:12 2016

A Django site.

QGIS Planet

How to create round maps in Print Composer

If you follow me on Twitter, you’ve probably seen previews of my experiments with round maps. These experiments were motivated by a recent question on GIS.stackexchange whether this type of map can be created in QGIS and while it’s not very convenient right now, it is definitely possible:

All maps in this post are created using data from the Quantarctica project.

I’ve been planing to try the Quantarctica datasets for a long time and this use case is just perfect. When you download and open their project, you’ll see that they have already clipped all datasets to a circle around Antarctica:

Quantarctica project with some custom styling

Quantarctica project with some custom styling

Since the map of the full extent of the dataset is already clipped to a circle, the overview map is easy to deal with. The detail map on the other hand is rectangular by default:


Since we cannot change the shape of the map item, we have to use a mask instead. To create a circular mask, we can add an ellipse shape:


The main challenge when creating the mask is that there is no inverted polygon renderer for shapes in print composer. I’ve evaluated to workarounds: First, I created a style with a wide white outline that would cover all map parts outside the circle shape. But this solution slowed the print composer down a lot. An alternative, which doesn’t suffer from this slowdown is using draw effects:


In particular, I created a big outer glow effect:


Note that the effect only works if the symbol itself is not transparent. That’s why I set the symbol fill to black and used the Lighten blending mode:


Voilà! Both maps appear are nicely circular.

It is worth noting though that this workaround has a downside: it is not possible to create automatic grids/graticules for these maps. The graticule in the overview map only works because it is a layer in the main project that was already clipped to the circular shape.

Finally, you can add more depth to your map by adding shadows. To create the shadow effect, I added additional ellipse items which are styled with a drop shadow draw effect. If you only enable the drop shadow effect, you will notice that the shadow is cut off at the ellipse bounding box. To avoid this undesired effect, you can add a transform effect, which reduces the size of the drawn shape and it’s shadow so that the shadow fits into the bounding box:


It requires some manual adjustments to place the shadow at the optimal location on top of the mask:


Add another ellipse to create the shadow for the overview map.

For more cartography tips and tricks check my new book QGIS Map Design or join my QGIS training courses.

Setting Up and Configuring Discovery Plugin for QGIS

As a part of migrating to Open Source GIS, the Newcastle City Council has commissioned us to create a user friendly gazetteer plugin.

In this post, we will import the OS Open Names and configure the Discovery plugin to use the data.

In the following sections, we are going to set up a PostGIS database and import the OS Open Names, freely available from here.

To use the data with the Discovery plugin, we need to first set up a PostGIS database and load the data inside the geo-databases.

If you have an existing Postgresql/PostGIS server, you can skip the next section.

Postgresql/PostGIS installation and configuration


For MS Windows users, download and install Postgresql from here (32-bit) or here (64-bit) install the software.

During the installation, select the StackBuilder to install PostGIS, under Spatial Extensions.

If your StackBuilder fails to download PostGIS (in case your proxy server blocks it), you can download and install it manually.

Preparing the database

Now that installation is successful, create a new database as osdata. Make sure you add PostGIS extension to your database. You can do that by simply running the following command in the Query editor:


Create osopennames as a new schema under osdata.

Preparing data

The OS Open Names comes in a zip file containing several CSV files.

Once the zip file extracted, there are 2 folders, one containing the header file (DOC) and the other containing the csv files (DATA).

To be able to import all the csv files in PostGIS, we can merge all the files including the header file.

You can move the header file (OS_Open_Names_Header.csv) from the DOC folder. To ensure, the file will appear first during the merge process you can rename it to 1_OS_Open_Names_Header.csv.

You can use Windows command prompt to merge the files. The following command merges all csv files to all_open_names.csv:

copy /b \*.csv all_open_names.csv

Loading data in PostGIS

There are several methods to import all_open_names.csv in PostGIS:

  1. Adding it as a delimited text layer in QGIS and then load it in PostGIS
  2. Importing it in PostGIS as a CSV and then using PostGIS' geometry to create points
  3. Using virtual layer and OGR2OGR library

In the example below, we explore the third option.

To create a virtual vector layer from your csv file, open a text editor, copy and paste the following lines and save it as all_open_names.vrt under DATA folder along with your csv file.


    <OGRVRTLayer name="all_open_names">
        <SrcDataSource relativeToVRT="1">all_open_names.csv</SrcDataSource>
        <GeometryField encoding="PointFromColumns" x="GEOMETRY_X" y="GEOMETRY_y"/>


In fact, you can use the virtual vector layer to merge all your csv files and skip the previous section!

You can then use ogr2ogr command from the OSGeo4W shell to import it to your PostGIS:


ogr2ogr -append  -a_srs EPSG:27700 -f "PostgreSQL" PG:"host= user=postgres dbname=osdata password=postgres active_schema=osopennames" -nln osnames all_open_names.vrt


Configuring Discovery plugin

First you need to install the plugin from the QGIS plugin repository.

Once the plugin installed, you should have a new toolbar. Click on discovery from the toolbar to open the configuration:

  1. For Connection, select OS Data
  2. For Shema, select opennames
  3. For Table, select osnames
  4. For Search Column, select Name1
  5. Select the option to Echo Search Column in Results
  6. For Display Columns select the followings:
    1. Name2
    4. COUNTRY
  7. For Geometry Column, select geom (or other columns depending on your QGIS or OGR versions)
  8. For BBOX Expresssion, type the following:

``` CASE



MBR_XMIN || ',' || 
MBR_YMIN || ',' || 
MBR_XMAX || ',' || 

END ```

And you should be able to start using the gazetteer plugin after pressing OK.

For performance enhancement and other tips visit this page.

Promoting and using QGIS for the enterprise

Over the years, QGIS has gained more functionality, more users and more people and organisations who make their livelihood from it. As an Open Source project, there are two things that we value most highly (and equally):

  • Our community of users
  • Our community of project contributors

The two groups are intermingled, co-dependent and indispensable to the project. As both these groups have grown, our reach has grown. Now as a project we touch the lives of (by best estimation) hundreds of thousands of users and contributors around the world.

It is a natural consequence of such reach that QGIS has become an attractive platform for companies on which to build service based business models to their customers. From this rises the advent of ‘enterprise’ offerings – service packages tailored for large corporate and government institutions which need service level agreements, guaranteed turn around times, helpdesk support and so on. As a volunteer driven, grass roots project we are not in the position to, and do not have the interest in catering to this class of user base via support agreements etc. Commercial support is far better taken care of through third party service providers that have the infrastructure and legal means to set up such service offerings.

As the momentum grows around such enterprise services it is probably an inevitable consequence that tension may arise between third party service providers and the QGIS core project. In simplistic terms this tension can be seen as the dichotomy between those of us who view our work on QGIS as a labour of love versus those who see their work around QGIS as a labour of commercial enterprise. Of course there are many cases where the people providing such support do come from the community, do see their work as a labour of love, but as the stakes get higher and the size of support companies grows (to the point where they are also recruiting staff from outside the QGIS community), there is more opportunity for this dichotomy to realise itself.

The reality is that much like the relationship between project contributors and our community of users, there is a huge amount of potential symbiosis between the QGIS developer community and the growing number of value added resellers providing services around QGIS: many of the improvements, bug fixes and other enhancements produced by value added resellers make their way back into the core QGIS offering, whilst the body of work produced by the community of QGIS project contributors becomes the basis around which value added resellers build their marketplace offering.

Over the years we have tried to be sensitive to the fact that many people rely on QGIS for their livelihood – initiatives such as our Long Term Release programme, the creation of test suites and heavy investment of donated project funds into bug fixing (among many other similar initiatives) have all gone a long way to making QGIS a viable platform for value added resellers. We would like to ask that resellers give the QGIS project similar consideration in their marketing and work endeavours. As such I would like to present a few simple guidelines below that you should use as guiding principles in your interaction with the QGIS project. I will use a hypothetical company ‘ACME Corp.’ in my examples below:

Respect the license

QGIS is published under the GPL v2 or greater license. The letter of the license states that if you extend the source code  of QGIS, and publish those changes (for example by making it available on a download site for your users), you need to publish the source code changes too, making them available to your users. In the spirit of the license, you should share your improvements to QGIS with the greater project (e.g. by making your code tree publicly accessible).

Similarly when publishing a plugin, don’t ship it with proprietary binary ‘blobs’, or only with .pyc (compiled python files) leaving out the original python sources. If you do absolutely have to ship it with a binary (for example you need a c-compiled python module for your plugin), make sure to provide a clear trail to the upstream sources for those binary elements.

I personally find discussions of licensing get quickly tedious and I prefer to emphasise the spirit of open source rather than getting stuck in legalese: “We share our work with you, you share your work with us and we all benefit“. It’s really that simple for me. When you stray from this maxim, you are very likely to, at best, ruffle feathers and, at worst, create a really bad impression about your company and the people that work for it.


Don’t present your work as our work

It seems obvious, but many miss the nuance here. If you wrote a marvellous plugin to count sheep in farm fields because it will add great value to your customers, call it ‘ACME. Corp sheep counter’, not ‘QGIS Sheep Counter’. Also bear in mind that the word ‘QGIS’ is trademarked (the trademark is owned by the community). If you want to name your project, you should read our trademark guidelines. Contact us at if you have any uncertainty about how you are using the word ‘QGIS’ in your brand.

Don’t present our work as your work

This is the corollary to the above. Our community works incredibly hard to make QGIS, the web site, the documentation, triage bugs, provide help on the mailing lists and forums. All that effort can be disregarded in a single line of careless copy like ‘QGIS by ACME Corp. is the next best thing since sliced cheese‘. Show a little love to the people that built the platform for your service offering and refer back to the parent QGIS project and its community as the progenitor of all the goodness you are sharing with your clients. That does not denigrate the valuable service that you provide your customers and it lets them know that you represent your company and work fairly and contribute back to the source project that you are basing your services on.

Friends don’t fork

Forking in Open Source is the process by which you create your own divergent copy of the  software and maintain it independently, often resulting in two incompatible versions (at the source code level) of the same project. Nobody really wins from that. Your customers lose the ability to migrate projects, workflows and knowledge between the community maintained version of QGIS and your modified one. In reality forking is normal (its the standard workflow in GitHub for example), but I really am referring to the process whereby you create an heavily diverged copy of the source code. When you create a divergent fork, your developers get stuck in a one directional highway which takes them further and further away from the original code base and any opportunity to capitalise on the work of other contributors from the QGIS community. There is also an economic imperative not to make a divergent fork – to quote community member Vincent Picavet:

“… forking a project is not a good idea in terms of economics. Maintaining software is more than half of the TCO [Total Cost of Ownership], and on the medium-long term, maintaining a fork of QGIS will cost much more than integrating the specific code into the master codebase, even if initial costs are higher for master integration.”

Don’t rebrand

Every few months I get an email from a value added service provider asking me if I can help them produce a version of QGIS which is rebranded as ‘ACME Corp. GIS’. By rebranding here I mean deep rebranding – not just replacing the splash screen (which I am generally OK with), but changing the word ‘QGIS’ everywhere in the source code and user interface to ‘ACME Corp. GIS’.  Beyond the fact that you instantly break all sorts of things like QGIS project file support, you also create a fork that will require massive amounts of maintenance  to keep in sync with the upstream project.

Integrate your team with the QGIS community

One great way to give your clients a good service and to ensure that your work is well accepted is to integrate your developers with the QGIS community. By that I mean let them subscribe to our mailing lists, participate in architecture and other discussions, fix issues, contribute code, attend our 6 monthly hackfests and generally be part of the ebb and flow of the project. There are so many benefits to doing this – both to QGIS and yourself – which is probably evidenced by the fact that the most well known QGIS value added service providers each have a number of developers participating in the community. My main motivation above all other reasons is that they will gain the sensitivity to know how to get your improvements integrated into the code base, and the trust and camaraderie of the other community members which is great when the time comes that they need help solving problems.


Integrate your work with the QGIS code base

Whereas above we ask you not to fork, how can you be sure your changes will be acceptable so that you do not need to maintain a fork? Whenever you are thinking about new features for your clients, I encourage you to think about how to make them generic enough that they can be incorporated into the main code base. Once you do that, you have an automatic delivery platform of your work to your users. QGIS has a well established release routine and the features shipped with QGIS get tested and used by many thousands of users. Besides you are benefitting from the features others are funding, why not pay the same compliment back by designing your features in a way that everyone can use them, not only your clients?

Keep us in the loop

There is so much going on around the QGIS project we often get surprised by things people do. More often than not it is a pleasant surprise but sometimes it isn’t. If you are planning some big new feature or creating a new service around QGIS, I highly recommend that you share it with the community early in your planning process. In particular for the case of new features that you would like to see in the main code base, coming along with an ACME Corp. 10,000 line code contribution with no prior consultation creates ample room for friction. If you want to know that a larger feature you are planning will be accepted, check out our QEP (QGIS Enhancement Proposal) process.

Don’t only contribute code

For some reason coders are treated as the main heros in the story of an Open Source project. Many people overlook the fact that there is a far larger team of translators, document writers, sys admins, authors, artists, testers and enthusiasts who contribute a massive amount of effort into the project. When you are thinking about how to contribute back to the project, take a moment to think about all the infrastructure around the project and how you might help that along – as well as the cool new features you plan to contribute to the code base.


There are many other things that you can do to integrate yourself into the community, but my real point in this article is that although QGIS is Free Software, it is not made for free. Take a look at the QGIS page on Ohloh if you want to get a feel for just how much effort has gone into QGIS. Many people have put a lot of sweat equity into QGIS and the only reward they get for their work (if they are lucky) is recognition and appreciation. Think of them when you build services on top of QGIS and find ways to acknowledge and motivate them!

Here’s looking forward to seeing many thousands of people making their livelihood by offering services around QGIS!


Tim Sutton

(QGIS Project Chair)

Agenda for 5th QGIS user group – Scotland

scottish thistleThe 5th QGIS user group meeting in Scotland takes place next Wednesday at the University of Glasgow.  It is being hosted by the School of Geographical and Earth Sciences and has been generously sponsored by thinkWhere and Ordnance Survey.  You can find the draft programme of talks and presentations here: 5th-QGIS-user-group-programme

All tickets are now gone but get on the waitlist and you may be lucky.

See you all there!

Interview: QGIS in journalism

Last year, I published the short post QGIS on the rise with journalists showcasing how QGIS is used by journalists with examples from the Los Angeles Times and Financial Times.

The latest QGIS case study now features an interview with Steven Bernard (Interactive Design Editor at the Financial Times) by A. Neumann and T. Sutton.

QGIS is now an integral part of our mapping workflow. (…) I would say 80% of our maps are now produced in QGIS. read more …

It’s great to see all the great examples of QGIS used to communicate international news. Thanks to everyone involved in this interview for sharing this case study with the community!

Styling maps in QGIS is better when it’s interactive

I’m sure you are all well aware of my hate of blocking dialogs, and when it comes to styling QGIS has a few and they annoy me to no end. With new fancy map making tools like MapBox and CartoDB all having nice non blocking styling options it’s about time QGIS followed suit to bring better control and faster workflows to users.

The first stage of the dock is complete, pending feedback of course, and merged into master.

Introducing the map styling dock:

2016-04-19 20_27_00-Action center

Having the style (label only at the moment) options in a dock widget opens up some really nice workflows to map styling.

Firstly, now you don’t have to do the Open -> Change Setting -> Apply -> Close -> Open dance each time you want to change a layer style.  The dock is linked to the active layer in the legend so you can move around freely, update settings, and move on.

Second, we can now have a great workflow and allow for live updating. Yes you did read that right, it will live update the map as you change values. How bloody great is that!  Reducing the feedback loop is always the best.  If it can be done live, do it live.  There is a Reset button if you make a mistake.

Third, all styling options will now live in a single location going forward. Once we have moved style, diagrams, blend modes, it will be a one stop shop for styles with no annoying dialogs getting in the way.

In QGIS 2.14 we also have this awesome feature for rule based labels, however that added another dialog, and I wasn’t going move to a dock just to have another dialog block me two steps down the road. So now all the rules based labels dialogs are panels inside the main dock. When adding a new rule it will show the rule editor, and the list when not.  Remember how I said the dock updates the map live, well that also applies when you add/update rules.  The dock will update the canvas as the rule changes even before you hit save on the rule

2016-04-19 20_48_36-Action center

2016-04-19 20_48_28-Action center

The new styling dock is in master now, although might not be in the nightly build for a day or so.

You can check out some videos of the dock in action here:

Super keen on any feedback and ideas anyone might have.  Give it a try and let me know what you think.

EDIT: I would also like to add that what I have started/done is only possible because of the great work that has been done before me. Big thanks to all the people that have done work to enable me to make this feature,  label settings, threaded rendering, data defined buttons, etc.

Filed under: Open Source, qgis Tagged: qgis

Learning QGIS 3rd ed. discounts

In time for QGIS 2.14 (soon to be LTR), I have updated “Learning QGIS” to reflect the latest improvements of our favorite GIS.

To celebrate, we are giving away 100 copies of the book at 30% (for print) and 50% (for eBook) discount if you use the following codes:

30% off  the Print version
Code: prt30LeaQS

50% off the eBook version
Code: LeaQSebok50

(Codes are valid until 30th April 2016 or we’ve reached 100 copies.)


Crayfish 2.2: New Features

Crayfish 2.2 is out with lots of new features and new formats.

Here are the new features in more detail…

Plotting time series and cross sections

Profile tool plugin deemed not to be suitable for plotting time series. It lacks several features for visualising plots over s specific grid and generally to user interface is not very intuitive.

With the new plot options, user can plot time series at a point from the map or using an existing layer to generate plots. The tool is very flexible and allows user to export the layer to another format. In addition to time series, you can also generate cross section plots. Video below demonstrates the new feature in action:

As you can see, in the above video, more points can be added to the plot. To do so, you need to hold down CTRL key.

GRIB and NetCDF support

We have decided to expand the user base for Crayfish and allow meteorologists and oceanographers to view their temporal unstructured GRIB or NetCDF directly in Crayfish. Examples of those datasets can be found here and here

Visualising global temprature datasets (GRIB fromat) in Crayfish

Support for TELEMAC and HEC RAS 2D

We also added suppord for HEC RAS 2D and TELEMAC. Our initial benchmark shows that Crayfish is much faster than an other TELEMAC plugins we used. Plus, Crayfish is truly open source!

More vector, contour and mesh options

You can now filter vectors to display only values above/below a certain threshold.

Contour label and values in Crayfish are now similar to raster styling in QGIS. This will allow users to generate better legend directly from Crayfish for print or animation outputs.

For debugging, we have added option to allow users to label mesh and change symbology.

Mesh labels in Crayfish


We’d like to thank The Laboratory of Hydraulics, Hydrology and Glaciology (VAW) of ETH Zurich for sponsoring plotting feature.



There is a FOSS4G UK conference, unconference, workshop, hackathon, code sprint and party happening in Southampton in June this year.  If you are free from the 14th to 16th then this is a fantastic opportunity to come and find out more about free and open-source software for Geo.  Have a look at the OSGeo site ( for more information.  If you want to submit a talk and/or workshop then you can do so through the site.  Early bird tickets will be going on sale tomorrow (13 April) and will be available through the site from Eventbrite.

New demos: live labels & gradient editor

Following up on last week’s post, Nyall has continued his work on the QGIS gradient editor:

Latest version of the new QGIS interactive gradient edit. This now includes an interactive plot of the color hue/saturation/lightness/alpha, allowing a visual overview of these color components and easy editing.

Another equally awesome demo has been posted by Nathan, who is currently working on usability improvements for labeling and styling without blocking dialogs:

This is going to be great for map design work because it makes many complex styles much easier to create since you can interact with the map and attribute table at the same time.

These are definitely two developments to follow closely!

Towards better gradients

Interesting developments going on if you like creating your own gradients. After all, that’s not as easy as it might initially seem, as Gregor Aisch describes in his post “Mastering Multi-hued Color Scales with Chroma.js”:

The issues with simple color interpolations, which include nonuniform changes in lightness between classes, also haunt us in cartography. Just have a look at the map and legend on the left-hand side, which has been created using a normal custom QGIS gradient with colors ranging from black to red, yellow and finally white. We end up with three classes in yellow which are nearly impossible to tell apart:


For comparison, on the right side, I’ve used Gregor’s corrected color ramp, which ensures that lightness changes evenly from one class to the next.

Wouldn’t it be great if the built-in gradient tool in QGIS could correct for lightness? Too bad the current dialog is not that great:

My first reaction therefore was to write a short script to import gradients from Gregor’s Chroma.js Color Scale Helper into QGIS:

But we’ll probably have a much better solution in QGIS soon since Nyall Dawson has picked up the idea and is already working on a completely new version of the gradient tool. You can see a demo of the current work in progress here:

I’m really looking forward to trying this out once it hits master!

How to fix the Windows config for .qgs default program

This is a short tip for you if you use QGIS on Windows and ended up with an error like this:

The program can't start because qgis_app.dll is missing from your computer. Try reinstalling the program to fix the problem.

Windows’ suggestion to reinstall probably won’t fix this issue. Instead, you want Windows to run qgis.bat instead of any .exe it is trying to use. Right-click a .qgs file and go to Open with | Choose default program:

Screenshot 2016-03-26 16.22.15

In OSGeo4W, the .bat file is located in the bin folder:

Screenshot 2016-03-26 16.27.01

Happy QGISing!

Prepare your plugins for QGIS 3

QGIS 3 is not yet there and there is still plenty of time to prepare and migrate. But I thought I would give some advice about things that you can keep in mind while working on your plugins to make

Verarbeitung von Interlis-Daten mit QGIS

In der Schweiz werden amtliche Geodatenmodelle vorwiegend mit Interlis erstellt und häufig wird das Interlis-Transferformat für den offiziellen Datenaustausch vorgegeben. Das Interlis-Plugin für QGIS ermöglicht die einfache Verarbeitung von Interlis-Daten und bindet externe Java-Applikationen in die Processing-Toolbox ein. Interlis ist primär ein Austauschformat und müss für die Verarbeitung in einem GIS konvertiert werden. Die Unterstützung von Interlis in der Open Source Bibliothek GDAL/OGR wurde ursprünglich von den Kantonen Thurgau und Solothurn finanziert und später vom KOGIS und der QGIS Usergruppe Schweiz finanziell gefördert. Der Interlis-Treiber war die treibende Kraft zur Unterstützung von mehreren Geometrien in einem Layer und zur Aufnahme von Kreisbögen in das Geometriemodell in Version 2.0 von GDAL/OGR.

Das Interlis-Plugin für QGIS nutzt die Funktionen von GDAL/OGR zur einfachen Verarbeitung von Interlis-Daten. Mit der Version 0.9 im März 2016 wurde die Einrschränkung auf eine Geometrie pro Layer für OGR-Datenquellen behoben, sowie die Ansicht von Interlis-Daten markant vereinfacht. Erreicht wird das durch die Auslagerung von Funktionen als Processing-Algorithmen, welche auf Java-Bibliotheken beruhen. Zur vereinfachten Installation und Konfigurationen werden die benötigten JAR-Dateien mit dem Plugin mitgeliefert.

Mit der im März veröffenlichten Version 2.14 von QGIS wurde in der OSGeo4W-Distribution der Umstieg auf OGR 2.0 vollzogen. Damit kann das im QGIS-Repository verfügbare Interlis-Plugin ohne weiteres verwendet werden. Noch einfacher geht es mit der “QGIS Portable Swiss Edition”, die ohne Installation direkt verwendet werden kann und damit keine Administratoren-Rechte benötigt. Das Interlis-Plugin ist darin bereits enthalten und QGIS ist für den Einsatz in der Schweiz mit den entsprechenden Referenzsystemen vorkonfigiert. Auch die NTv2-basierte Umrechnung von LV03 und LV95 ist bereits enthalten. Das ZIP-File kann hier heruntergeladen werden und an beliebiger Stelle (auch auf einem USB-Stick) entpackt werden. Mit dem Aufruf von “qgis.bat” wird das vorkonfigurierte QGIS gestartet ist sofort einsatzbereit.

Transferdaten im Interlis 1 (itf) oder im Interlis 2 (xtf) Format können über den Plugin-Dialog direkt in einen Layer importiert werden. Das dient in erster Linie der einfachen Visualisierung von Interlis-Daten, über die Speicherfunktionen der QGIS-Layer kann die temporäre Ansicht jedoch auch in eines der untestützen OGR-Formate wie Shapefiles konvertiert werden.

image image image

Das Interlis-Modell wird über einen Webdienst in den offiziellen Repositories gesucht und im IlisMeta XML-Format zurückgeliefert. Dieses Modell-Format kann von OGR direkt gelesen werden. Falls das Modell nicht gefunden wird, kann es mit dem Processing-Tool “Ili Model -> IlisMeta” erzeugt werden.


Zur Ausführung wird ein Java-Interpreter benötigt. Falls dieser nicht automatisch gefunden wird, muss der Pfad unter Verarbeitung->Optionen entpsprechend konfiguriert werden.


Ein solches IlisMeta-Modell kann im Import-Dialog unter “Lokales Modell” ausgewählt werden. Damit können z.B. kantonale AV-Daten importiert werden:

image image image

Für Anwender, welche die Grundlagen zur Verarbeitung von Interlis an einem Workshop erlernen wollen, veranstaltet Sourcepole am 13.4.16 einen eintägigen Kurs in Zürich. Darin werden zuerst Interlis-Grundlagen und die Abbildungsmöglichkeiten auf releationale Datenbanken vermittelt. Ausgehend von QGIS wird auch auf weitere Open Source Tools wie ili2pg und ili2gpkg eingegangen. Anmeldung und weitere Informationen:

Creating dynamic icon series

Today’s post was motivated by a question on GIS.StackExchange, which is looking for an automated way to symbolize the amenities available at a location using a series of icons, like this:

Screenshot 2016-03-19 23.02.30

Assuming the information is available in  a format similar to this example attribute table

Screenshot 2016-03-19 23.02.00

we can create a symbol, which adapts to the values in the icon columns using data-defined overrides:

Screenshot 2016-03-19 23.04.17

The five potential symbol locations are aligned next to each other using offsets. We use the following expression to determine the correct SVG symbol:

WHEN "icon4" = 'dinner'
 THEN 'C:/OSGeo4W64/apps/qgis-dev/svg/entertainment/amenity=restaurant.svg'
WHEN "icon4" = 'sleep'
 THEN 'C:/OSGeo4W64/apps/qgis-dev/svg/accommodation/accommodation_hotel2.svg'
WHEN "icon4" = 'ship'
 THEN 'C:/OSGeo4W64/apps/qgis-dev/svg/transport/amenity=ferry_terminal.svg'
WHEN "icon4" = 'house'
 THEN 'C:/OSGeo4W64/apps/qgis-dev/svg/accommodation/accommodation_house.svg'
 ELSE  ''

To hide icons if the icon value is NULL, the marker size is set to 0 using, for example:

WHEN "icon4" is not NULL

Finally, to ensure that the labels don’t cover the icons, we can use the cartographic label placement with the position priority set to ‘TR,TL,BL’, which restricts labels to the top right, top left, and bottom left position.

Screenshot 2016-03-19 23.04.43

With these settings in place, we can zoom out and the labeling algorithm picks the most suitable position from the list of allowed positions:

Screenshot 2016-03-19 23.02.11

For more cartography tips and tricks check my new book QGIS Map Design or join my QGIS training courses.

How to create a graduated renderer for polygon borders instead of fills

Today’s post was motivated by a recent question on the #gistribe Twitter chat:

So what’s the issue?

Default polygon symbols come with a fill and a border color:

Screenshot 2016-03-12 15.40.37

When they are used in a graduated renderer, the fill color is altered for each class:

Screenshot 2016-03-12 15.40.26

What if you want to change the border color instead?

The simplest solution is to add an outline symbol layer to your polygon symbol:

Screenshot 2016-03-12 15.40.46

The outline layer has only one color property and it will be altered by the graduated renderer.

If you now hit ok, the graduated renderer will alter both the simple fill’s fill color and the outline’s color. To stop the fill color from changing, select the simple fill and lock it using the small lock icon below the list of symbol layers:

Screenshot 2016-03-12 15.40.50


Screenshot 2016-03-12 15.40.58

For more cartography tips and tricks check my new book QGIS Map Design or join my QGIS training courses.

(Nederlands) Kadastrale percelen en het gfs bestand

Sorry, this entry is only available in the Dutch language

QGIS Server Simple Browser Plugin

Today I’m releasing the first version of QGIS Server Simple Browser Plugin, a simple Server plugin that generates a browsable table of contents of the project’s layers and a link to an OpenLayers map.


How it works

The plugin adds an XSL stylesheet to GetProjectsettings XML response, the generated HTML looks like this:


QGIS Server Browser TOC Tree

The openlayers format

The map preview is generated by adding a new application/openlayers FORMAT option to GetMap requests, the generated map automatically fits to the layer’s extent and has basic GetFeatureInfo

QGIS Server Browser TOC Preview


The current version only supports EPSG:4326 that must be available (enabled) on the server.

Source code and download

The plugin is available on the official repository: ServerSimpleBrowser
The code is on GitHub.

UIs are for the weak. Welcome to ASCII QGIS land

Have you ever thought “gee I wish I could have a ASCII  QGIS map viewer for console use.  I’m so over these fancy UIs with their fancy graphics, fonts, and icons”.



You are still reading? OK good I thought I lost you.

Anyway. Here is a fun idea. A ASCII QGIS map viewer that renders your project files in a console window (with colour possible).  Still with me?

This project was mainly just a bit of fun to play with the curses Python library and QGIS. What started off as a random idea on the train seems to have turned into full “usable” thing, if viewing a project and the legend is considered usable.

If you are still with me and itching to see it in action here it is.  In all the ASCII glory


What can it do so far?

  • Load project
  • Pan
  • Zoom
  • Set colour mode on/off


The code is up at (or

It’s a bit of a fun side project at the moment so you might find bugs as I have only tested it on my machine.

Follow the README on github for notes on running.

Have fun.



Filed under: Open Source, qgis

New release of QGIS and book!

Last week not only QGIS 2.14.0 Essen was released but also a great book “QGIS Map Design” based on this new version of QGIS. A release of QGIS is special but this release concerns an announced LTR release.  QGIS 2.8.7 is the current LTR version in which al bugs found between 2.8 and 2.14.0 have been … Continue reading New release of QGIS and book!

  • <<
  • Page 3 of 87 ( 1724 posts )
  • >>

Back to Top