Mapping Abuja’s Security Infrastructure: How to Fetch Point Layers using TerraLab's AI Agent for QGIS
Geospatial data extraction has historically required jumping between specialized data web portals, building complex Overpass API queries, or manually digitizing locations. However, with the emergence of AI agents built directly into GIS environments, extracting specific spatial data is now as simple as writing a chat message.
In this guide, we will walk through using the AI Agent by TerraLab inside QGIS to automatically pull a comprehensive point layer of security installations within the Abuja Municipal Area Council (AMAC), Nigeria. We will cover police stations, military cantonments/barracks, and the Nigeria Security and Civil Defence Corps (NSCDC) offices.
I decided to try the AI Agent in QGIS, I installed the AI agent by TerraLab via the plugin manager, it was a great expereice to say the least. It literally completed a task for me in way less minutes than I would have done it manually. Here are the details of what I tasked it to do;-
Task/Prompt: I need point layer for all the security agents offices in Abuja Municipal Area Council (AMAC) including Police stations, Millitary cantonments/baracks and Nigeria Security & Civil Defence Corps.
Result: As seen below, it successfully retrieved 53 points for the result. Although, not all were security infrastructures I expected, so I did some manual verification and cleaning.
How to Install and Initialize the AI Agent
Before prompting the agent, ensure you have the plugin installed and
ready in your workspace.
- In
QGIS, navigate to the top menu and select Plugins > Manage
and Install Plugins.
- Search
for AI Agent by TerraLab and click Install Plugin.
- Once
installed, open the agent interface panel using the keyboard shortcut Ctrl
+ Alt + A (or click the TerraLab icon in your toolbar).
- Sign
in to your account to activate your monthly free message allowance.
After you are signed in, enter the prompt and once you hit submit, the AI Agent creates an
execution plan which you can monitor live in the side panel:
- Boundary
Retrieval: The agent queries global administrative
databases to find the official polygon layer for AMAC.
- Data
Extraction: It simultaneously queries regional open datasets
using tags like amenity=police, military=barracks, and generic
security/government office infrastructure filters tailored to Nigeria's
public safety sectors.
- Reprojection
& Layer Creation:
The data is transformed into your project’s Coordinate Reference System
(CRS) and compiled into a dedicated point feature layer.
- Symbology
Application: Instead of generic circles, the agent can apply
categorized styling, assigning separate colors or icons for Police,
Military, and NSCDC sites if that was stated in the initial prompt.
One of the most powerful aspects of the TerraLab AI Agent is its
built-in safety net. If the agent misinterprets a layout or grabs points
outside your target area, you don't have to manually delete elements. You can
use the one-click Undo checkpoint feature in the panel to revert the
changes and refine your prompt.
Once you are satisfied with the layer, you can right-click the newly
generated layer in your QGIS Layers Panel and select Export > Save
Features As... to save the clean dataset permanently as a GeoPackage or
Shapefile for your local security intelligence audits.
By
leveraging the AI Agent
by TerraLab, what used to be a tedious multi-step data mining workflow is
reduced to a single conversational task. Whether you are mapping critical
infrastructure for urban planning or conducting risk assessments in Nigeria's
capital, AI-driven GIS tools ensure your time is spent analyzing data rather
than hunting for it.
Happy AIing!















