Latest news will appear here soon.

Tag: en_gb

Improving Memory Safety in QGIS

As part of our Security project for QGIS initiative, we identified a work package titled “Improve Memory Safety.”

Having worked on this topic over the last few months, here is a summary of the issues involved and what has been accomplished so far.

It’s not an easy thing to present this topic. I’ll try not to dive into too much technical details to focus instead on the broader objectives and implications.

Once upon a time, in the United States


In November 2022, the NSA published a report on software security, in which it stated:

Microsoft and Google have each stated that software memory safety issues are behind around 70 percent of their vulnerabilities. Poor memory management can lead to technical issues as well, such as incorrect program results, degradation of the program’s performance over time, and program crashes.

In other words: 70% of software vulnerabilities stem from memory management issues.

NSA recommends that organizations use memory safe languages ​​when possible and bolster protection through code-hardening defenses such as compiler options, tool options, and operating system configurations.

The NSA recommends using “Memory Safe Languages” (MSLs) or “hardening” the code. QGIS consists of approximately 1.5 million lines of C++ code, a language not “memory safe” by default. I am therefore opting for the “harden the code” approach, rather than a rewrite which, I have to admit, would have had the “advantage” of keeping me employed until retirement.

What’s the problem?

C++ is not a “memory-safe” language by default, as it does not require the explicit management of the lifecycle of the memory segments it uses.

 

That sentence didn’t make any sense to you, don’t worry, it won’t hinder your understanding of what follows.

C++ developers are expected to be careful: they must ensure they don’t forget to deallocate memory that was previously allocated, while also avoiding deallocating the same memory multiple times, errors that can lead respectively to memory bloat or program crashes.

These memory management issues can be exploited by malicious actors to inject code into a program, potentially allowing them to steal passwords or gain unauthorized access.

 

A malicious actor

Work performed

Fortunately, C++ offers control structures known as smart pointers, which help manage the memory lifecycle. Using them helps prevent memory leaks and crashes, while also limiting the attack surface.

QGIS currently makes limited use of these. The goal, therefore, is to expand their adoption throughout the codebase and prevent the addition of any new code that fails to utilize them.

To achieve this, I developed a program that rewrites the code to incorporate smart pointers, followed by an extensive review process to ensure no new errors were introduced.

A QGIS contributor in the middle of reviewing a pull request

Why not use AI?

Nowadays, it’s hard to discuss any software engineering topic without bringing up AI (at least we don’t hear about blockchain anymore!), so I feel compelled to answer the question: “Could AI have been used for this task?”—or, to use the terminology favored by “tech-bros,” could it have been “AI-powered”?

The answer is YES. But also NO. For one thing, the QGIS project is still determining its policy regarding AI; for the time being, a moratorium is in place that prohibits its use within the QGIS core.

Furthermore, it would have required a more thorough review. My migration program is deterministic—when it makes a mistake, it always does so in the same way. The same cannot easily be said for a probabilistic machine.

So, does this mean we’re now “memory safe”?

Not quite. We’ve reached a significant milestone, but there’s still more to do. This work will continue over the coming months.

In parallel, I’ve also begun a related project, supported by a QGIS.org grant. The goal is to replace SIP_FACTORY annotations with unique pointers. Explaining the technical details of this, however, would likely scare off the few readers who have made it this far!

This initiative is part of a broader effort, as we believe that all security-related issues must be addressed simultaneously and with equal rigor. After all, what’s the point of installing a reinforced front door if you leave the garage door wide open?

To be continued


We are committed to a process of continuous improvement—both for the QGIS codebase itself and for the workflows surrounding how the software is contributed to and distributed. It is worth noting that this initiative is not just about security; it also helps to reduce software crashes and memory footprint.

It requires financial support. If you would like to contribute, or if you have any other questions regarding QGIS, please do not hesitate to contact us at mailto:infos+qgis@oslandia.com.

You can stay informed by subscribing to our newsletter and following us on LinkedIn.

Learn More

KSJ Browser: Add National Land Numerical Information to QGIS - QGIS LAB by MIERUNE

Introduction National Land Numerical Information is open data that provides a wide range of GIS data about Japan, such as administrative boundaries, land use, and disaster risk. To use it in QGIS, you...
Learn More

AI GIS: What It Does Today and Which Tool to Use

AI GIS is software that does GIS work from imagery or a prompt. The five jobs it handles in 2026, the tools for each, and where it still fails.
Learn More

Tree Inventory in QGIS From Aerial Imagery

Build a tree inventory in QGIS: one point per tree from aerial imagery or LiDAR, with ID, crown size and height, then species and condition from the field.
Learn More

A look back at the QGIS User Conference 2026

Oslandia took part (actively!) in the QGIS User Conference 2026, which was held in early October in Laax, Switzerland.

The teams led four workshops and talks on the first day:

  • Workshop: ‘QGIS Expressions: from labels to geometry generators’ (by Benoit de Mezzo)
  • Deploying QGIS in large-scale IT systems – best practices (by Vincent Picavet)
  • Mental health and open source: a sensitive topic for engineers (by Vincent Picavet)
  • From users to contributors: rethinking participation in QGIS (by Jean Felder)

The second day provided an opportunity to attend talks and forge links with the international community!

Learn More

What Is Remote Sensing? Sensors, Free Data, QGIS

Remote sensing is measuring the ground from satellites, planes and drones. The sensors, the free data, and a Sentinel-2 workflow in QGIS, step by step.
Learn More

Connecting with the open-source community at FOSS4G Belgium

Explore Lutra Consulting's highlights from FOSS4G Belgium 2026, featuring QGIS and Mergin Maps presentations, mobile GIS workshops, and community engagement.
Learn More

Live at Leeds - Lutra at FOSS4G:UK 2026

Discover Lutra Consulting and Mergin Maps' highlights from FOSS4G:UK 2026 in Leeds, featuring insights on AI in GIS, CRAG integration, and QGIS advancements
Learn More

QGIS User Conference 2026 in Laax đŸ”ïžđŸ—șïžđŸ’š

420 people on a mountain, and what stayed with me

Last week we brought the QGIS User Conference up to 2222 metres. Four hundred and twenty people from more than thirty countries and five continents got into a gondola in Laax and came up to Crap Sogn Gion, and for two days the Galaaxy was full of talks, six keynotes, twelve short workshops and a lot of coffee. It is the biggest conference that has ever happened on this mountain. A week later I am still a little bit amazed that it worked.

But the logistics are not what stayed with me.

We did not put digital sovereignty on the programme as a track, and still it was everywhere. Gerhard Andrey opened on Monday morning with Switzerland and open source, and from there it simply did not go away. For the people from public administrations in the room this is not philosophy. It is a line in a budget. They have data they must keep readable for thirty years, and tools whose conditions can change from one year to the next.

Gerhard Andrey Keynote on Digital sovereignty
Gerhard Andrey Keynote on Digital sovereignty

The conversation I keep thinking about was with a man who used to sell proprietary GIS licences for a living. At some point he did the maths on what his country, which is not a rich country, pays every year for software it will never own, and he decided the money would do more good building something his country actually controls. So he quit. Now he works on open national geospatial infrastructure. He did not tell me this like a big story. He told it like you tell someone you changed job.

That one stayed with me for the rest of the week.

Lorenz Hurni came after Andrey with maps as instruments of power, which is a good reminder for anyone who still thinks a basemap is something neutral. Anita Graser đŸŒ» talked about AI in the QGIS ecosystem, Johannes Kanonier took us through fifteen years of QGIS at the State of Vorarlberg, and Ivan Minčík, Lova Andriarimalala and Tim Sutton made the least glamorous and most necessary point of the week, which is that somebody has to maintain the infrastructure and that somebody needs to be paid.


Anita Graser’s Keynote on AI

Here is the thing I keep coming back to. Open source does not give you sovereignty by itself. If you download free software and then nobody in your country can fix it, extend it or answer for it, you have only changed the shape of your dependency. What makes it real is what happened in those corridors, where the people who pay for the software and the people who write it were standing in the same line waiting for lunch.


Discussing and taking

And that is not a nice image, it is literally what happened. On Wednesday we ran ten full-day workshops down in the valley with 120 people, on point clouds, data processing, plugin development, automation, collaboration and field data infrastructure. Seventy-one people spent the QField Day walking around Laax in small groups collecting data. From Wednesday to Friday the 29th Contributor Meeting put developers, translators and documentation people around the same tables, and some of what was discussed on Monday was already a commit by Thursday. Three days from a problem on somebody’s desk to a fix in the code. That loop is the real product.


đŸ“· Contributors Meeting


And around all of that there was the other programme, the one that never appears as a session in any schedule. On Sunday, before the conference even started, ninety people walked the Ruinaulta and the Segnes plateau with guides. On Monday and Tuesday whoever took the first gondolas could do yoga at eight in the morning on a terrace at 2222 metres, or a short walk, or a QField crash course, or a crash course in Romansh. There were trail runs on Wednesday and Friday for the people who consider six or ten kilometres before breakfast a reasonable idea. And on Tuesday, when the conference was over, a few of us did not take the gondola back down. We flew. Launching off Crap Sogn Gion next to Régis Haubourg from the PSC was how a dream that had come true finally closed.

I am fairly sure more friendships came out of those hours than out of any session.

Closing flight

Thank you to HAPPY SURVEY Sagl, EBP Schweiz, Lutra Consulting, arx iT (GIS Consulting, Implementation and Training), OW Ocean Winds, the Province of South Holland and our other sponsors. Because of you a student and somebody from a cantonal office could sit in the same room. Thank you to Flims Laax Falera Management AG and the Weisse Arena Gruppe, who let us put a conference on top of a mountain without blinking. Thank you to the volunteers, scanning badges at seven in the morning, sending four hundred people to the right gondola and the right lunch table, carrying boxes up and down the mountain. To all the speakers, to my team at OPENGIS.ch, and to everybody at QGIS.org Association and QGIS User Group Switzerland who gave their free-time to this.

The most heartfelt thank-you goes to Anna Randegger, who kept the whole thing running while I was enjoying being on a stage and to my family, who put up with a whole year of me being half somewhere else even when I was sitting at the table with them. Thank you for the patience and for the support, I know it was not always easy.

Finally to everyone who was in the Hangar on Tuesday evening. I still get goosebumps and a knot in my throat when I think back to that standing ovation.

You made a year of work dissolve into tears of joy.

One last thing that makes me smile every time is that one of the next QGIS releases will be called LAAX. Over twenty million application starts every month, each one carrying the name of a village of fifteen hundred people in the Surselva where by now I know every single walkable path. Word of the father of a five month old 😉

Augmented reality QField sticker with a view 🙂

Vemo-nos em Portugal! đŸ‡”đŸ‡č👋

â„č https://uc2026.qgis.org

đŸ“· https://download.opengis.ch/qgis-uc-2026.zip

Learn More