Introducing our QGIS AI Map Tracing Plugin (January 2024)

Michael Egan

January 31, 2024

Advancing GIS with AI Innovation

The PDF is often the butt of jokes, a cause of headaches, and a waste of time in the GIS community. Our vision is that machine learning can make the PDF a problem of the past—perfectly interoperable with any GIS. Our first step towards this goal is our QGIS plugin for tracing PDFs and GeoTIFFs, offering a faster way to digitize raster images into vector layers. With this plugin, hours spent digitizing can be turned into minutes as our AI autocomplete finishes lines and polygons that you start. In this article I will break down how we built the plugin, how to use it, and what’s next for GeoAI applied to PDFs.

Benefits of the Plugin

This new plugin was built with the singular goal of cutting the time GIS teams spend digitizing PDFs. We want to augment GIS professionals and make a routine task more manageable and less labor-intensive. Whereas a curved line may take hundreds of clicks to digitize, our plugin only takes two clicks, finishing the process in under a minute.

More Examples of Auto-Vectorization Software

Other geospatial engineers have tried to tackle this digitization problem— without machine learning. One example is AutoTrace, a QGIS plugin last updated in 2015 that uses Q* path-finding to trace along solid color lines. There’s also ContourTrace from 2011 for digitizing contour lines. While doing our research, we realized that adding a well-trained machine learning model into the GIS technician’s workflow can 10x throughput, even compared to these non-AI approaches.

Features of our QGIS AI Digitizer

Central to our plugin is an AI model trained to recognize and convert features from raster images into precise vector data. The model's custom architecture can precisely isolate raster lines for both line and polygon digitization, ensuring precise, reliable output. On average, our model can keep the line within the same pixel that a GIS professional would choose, though we haven’t exceeded human performance (yet!).

How to Use the Plugin

Installation

The first step is to install the plugin. To install the plugin, you should open QGIS and find it in the official QGIS plugin repository as “Bunting Labs AI Vectorizer”.

Bunting Labs AI Vectorizer in the QGIS plugin repository

This is how the plugin shows up in the QGIS plugin manager

This is the icon to select in the toolbar, hovering over it should read “Vectorize with AI”

The above icon will appear in your plugin toolbar. Click it to proceed through the onboarding, where you'll sign up with your email and confirm your account. Now, you’ll be able to use the AI!

If you have already signed up via the website, your process to use the plugin is the same except you will be prompted to put in your Secret Key, which is a string of letters and numbers found on your dashboard after you sign in.

You will be on a free trial to use the plugin on your own maps. If you want more digitization throughput, you can upgrade for more usage and more features like fine-grained control over how we store your maps.

Lines

To start the plugin, click into a vector layer and enter edit mode. Then locate and select the vectorizer icon in the toolbar to begin digitizing. Find the line you want to digitize, and make the first segment (two clicks, one at the start of the line and one a bit further down the line to give the AI the context it needs). Then, the AI will complete as much of the line as it can and prompt you when to continue. When you’re satisfied with the digitization, just right click and it will create a new line.

Polygons

This entire process also works for polygons! If you use the plugin on an active polygon layer, then it will trace the border of the polygon and fill the interior. You can then right click to capture the polygon into your vector layer.

Editing

When autocomplete gets distracted by the wrong line or veers off the center, you can use the shift key to amend the line and keep vectorizing.

  1. Holding shift, hover over the last good vertex, and left click. This will cut the line to that point.
  2. Holding shift, left click as needed to move past the difficult section.
  3. Release shift. Then, left click to continue autocompleting.

Don't worry about whether the plugin works on your computer. If it can handle running QGIS then it can handle our plugin. The AI runs remotely on our web server so you don't need the expensive hardware we use. Traffic between our web server and the plugin is encrypted, so your data remains secure.

Reverting back to it when selecting out

If you need to use any other QGIS feature and want to return to using the AI plugin, simply select the icon again and the AI will be re-engaged.

How We Built the AI Autocomplete

The development began with thorough data preparation, ensuring our AI had a broad range of geospatial features to learn from. This step was crucial in making the tool adaptable to any maps thrown at it. Because GIS is such a rich field with so many applications, the plugin needs to be able to work on any style of maps, so we trained it to be as robust as possible.

After creating a good dataset—an important task that we still work on—we trained our AI model. We focused on making sure it prioritized accuracy as much as possible. Because we know that only perfect digitizations are helpful, we made sure the AI model reflected that. In practice, this means that we trained it to be as focused as possible on the line you are digitizing, and not get distracted by other features on the map, no matter how complicated it may be.

Results

The outcome is a tool that enhances the speed of the digitizing process. While it's a significant improvement, we view it as one step in the ongoing journey of GIS technology advancement, not an endpoint.

Conclusion: Looking Forward in GIS AI

The QGIS AI Digitizer is our newest contribution to the GIS community—a tool designed to make a specifically painful aspect of GIS work more efficient. It's a testament to how AI can be integrated into GIS workflows to offer practical improvements.

What’s Next in QGIS AI

As we look to the future, we’re excited to be developing more experimental plugins to tackle every problem the PDF causes. Up next on our roadmap is an AI that automatically georeferences maps. We examine the map for features a human would use to georeference—building outlines, intersections, geographic features—and line them up with public datasets. At the time of writing, our AI can georeference maps to within 5 meters, and we’re looking forward to getting that down to sub-1 meter accuracy.

Looking further into 2024, we’re planning on adding one of our most requested features: AI metadata extraction. Keeping up-to-date metadata with your features is a constant battle in GIS, and the recent developments in large language models is making it increasingly possible.

Want to try experimental features?

If you use our AI digitizer and want to beta-test our AI georeferencer, reach out at [email protected]! We’re always excited to see what people are working on and how our software can be helpful.

To start using the plugin, sign up here.