QGIS Planet

Newly-Committed QGIS 3.0 Algorithm: Raster Layer Unique Values Report

Getting a pixel count and area size of unique values for a given raster layer hasn’t been straightforward in QGIS. The user could either go through third-party solutions via processing with some limitations, or create a (slow) python script.

That is, until now. Say hello to the newly-committed processing algorithm, the “raster layer unique values report”.

The QGIS algorithm will take a raster layer as input and output an HTML formatted report listing the pixel count and area size – in the raster layer’s unit - for all unique values. Thanks to QGIS core developer Nyall Dawson’s fantastic work on the processing platform in upcoming QGIS 3.0, the algorithm is written in C++ and therefore much faster - over a tenfold improvement - to an equivalent python script.

Using QGIS’ processing modeler, users can come up with a simple model to provide unique values reports within areas of interests, defined through vector polygons: Simple processing model in QGIS 3.0

For example, using the newly-updated 2016 Global Forest Change dataset and the model above, we can quickly generate a deforestation per year chart. Simply reproject the dataset in the appropriate meter-based projection, clip it with a national boundaries polygon, et voila. Paste the resulting HTML table into your favorite spreadsheet program and enjoy the charts: Algorithm HTML output in spreadsheet view

More QGIS 3.0 Improvements: Saving Map Canvas as Image & PDF

(This blog post might as well have been titled “QGIS ❤ Wallpapers”)

Over the span of a week, QGIS received a set of improvements which greatly improved the canvas’ save as image function, as well as a brand new save as PDF feature.

Queue the usual slide of improvements: Improvements ovewview

Adding output resolution, width and height settings effectively frees users from the confine of their physical screen. Being able to fine tine the width and height in pixel also helps cartographers producing maps best-fitted for web-based content.

Saving as PDF feature is a real time saver, offering a fast path to vector export of maps without the need to go through creating a composer, adding a map item, etc.

All of these improvements are very useful to improve quick n’ dirty map export. It is however no replacement to the powerful QGIS composers. On that front, a QGIS core developer at North Road has launched a crowd funding campaign to modernize composers. For those cartographers out there publishing maps on various media forms (print, online, ebooks), seriously consider supporting this campaign.

Color Ramp Improvements in Upcoming QGIS 3.0

QGIS’ handling of color ramps has just gotten much better with a series of improvements we committed to the open source project’s upcoming version 3.0.

This slide goes through brief summary of changes: Color ramp handling, made fun! Color ramp handling, made fun!

On the developer front, one nice improvement is the addition of an invert() function directly attached to color ramp classes (QgsColorRamp and its children). This removed the need for symbol layers and renderers to implement individual invert-related functions; those are now served with a customized source color ramp, with edited steps and/or reversed order already taken into account.

Back to Top

Sustaining Members