Process

How we work with QGIS for Data Analysis and Visualization at Plan4Better

Open source isn't just a philosophy for us—it's how we work. QGIS and GOAT together form our spatial analysis powerhouse. In this blogpost, we're sharing the workflow we've built in QGIS (yes, including the messy parts).
By
Camila Narbaitz
October 2, 2025
How we work with QGIS for Data Analysis and Visualization at Plan4Better

At Plan4Better (P4B), we specialize in transport infrastructure, urban and environmental planning. Our work revolves around geodata, spatial analysis, and digital planning tools, helping cities and governements design livable spaces. At the heart of our workflow is QGIS, the open-source GIS platform which we integrate with our open-source tool GOAT, and together they enable us to process, analyze, and visualize complex spatial data efficiently. Today, our GIS Analyst, Gokul Gopan along with myself, Camila Narbaitz, cartographer of the team, tell the story of how we implement QGIS within P4B.

𝗪𝗵𝘆 𝗤𝗚𝗜𝗦?

Our team chose QGIS to solve several core challenges in our planning workflow: we needed to collaborate effectively on maps as a team, manage and integrate many different datasets from various sources, and automate repetitive tasks to save time and ensure consistency across projects. Most importantly, we needed a tool that could seamlessly integrate with our open-source planning tool GOAT to create a cohesive ecosystem for data-driven planning.

QGIS is a powerful open-source tool that aligns perfectly with this mission. Unlike proprietary software like ArcGIS, it allows us to customize workflows without licensing costs. This flexibility is crucial for our projects, where we often need to adapt tools to specific planning challenges.

Screenshot of a project in QGIS

What sets QGIS apart for us is its community-driven development. We leverage existing plugins and create our own to automate those repetitive tasks like applying style templates and map design, which directly addresses our need for efficiency and project consistency.  

As mentioned previously, QGIS integrates seamlessly with our open-source tool, GOAT, creating the cohesive planning ecosystem we were looking for. This combination enables us to improve our spatial analysis, and provide our clients with a tool to make data-driven decisions.

Our Powered QGIS Workflow

Our typical process involves four main steps:

1. Data Collection & Curation

We begin by carefully curating the necessary datasets. This includes gathering the necessary demographic datasets, GTFS transit feeds, open public data sources (like OpenStreetMap extracts) from our already created catalog, and integrating proprietary datasets provided by our clients. This initial step is crucial for creating a unified and comprehensive spatial data foundation for any project.

View from a table, from one schema on a one of the multiple databases we have on pgAdmin
2. Data Integration & Management in PostGIS

All collected spatial data is then systematically integrated and stored in a central, specially configured PostgreSQL/PostGIS database. Using PostGIS functions, we perform essential spatial operations—such as querying, analyzing, and manipulating geographic data—directly within the database. This approach allows us to efficiently manage and process complex datasets, ensuring high performance and data integrity before we even open QGIS.

PostGIS example: Using JOIN LATERAL and ST_DWithin to find the nearest street to a building's front door
3. Analysis & Automated Processing in QGIS

With our data prepared in PostGIS, we connect to it directly within QGIS to perform advanced spatial analyses. To automate repetitive tasks and ensure methodological consistency, we leverage and develop custom PyQGIS scripts and plugins. This automation saves valuable time and reduces the potential for manual error during complex analytical processes.

Example of a PyQGIS plugin snippet: applies styles stored in PostGIS directly to QGISlayers

4. Map Creation, Styling & Verification

Finally, QGIS becomes our canvas for designing clear, informative maps that communicate our findings effectively. We recognized that maintaining a consistent visual identity across projects was a challenge, especially when working as a team. Our solution was to build two custom plugins that automate and standardize this final phase. The first, a style application plugin, lets a user apply a predefined visual preset to any layer in just three clicks—selecting the layer, choosing the style, and applying it. This ensures that every project adheres to our design standards effortlessly. The second, a layout template plugin, allows us to generate entire map compositions with a single click. Selecting a template (e.g., "catchment area analysis") instantly adds a print layout to QGIS, complete with predefined map extents, a standardized legend, an automated scalebar, and title blocks.

Screenshot from our plugins. On the left the Style application plugin, and on the right the Layout template plug in

By automating these previously manual tasks, we've significantly accelerated our final map production, reduced errors, and freed up more time for the actual planning insights, ensuring every map we deliver is both beautiful and consistently on-brand.

Screenshot from an example of our styled maps using the plugins

Challenges and Solutions

While QGIS is powerful, we’ve faced—and still encounter—key challenges. Some we've solved, others we're still tackling:

  1. High-resolution and real-time datasets can slow down. Even with PostGIS, complex analyses can lag. Our fix? Every imported dataset gets automatic primary keys for editing in QGIS and spatial indexes right from the start—no manual indexing needed later and QGIS can query large datasets much more smoothly from the start.
  1. Perfect cartographic consistency? Almost there. Our plugins help, but projects sometimes need tweaks. We use Map Themes auto-match layouts, expressions that dynamically update titles, scalebars that adapt to extent, but still human eyes catch what automation misses.
Screenshots on how we work with Map Themes.
  1. QGIS and GOAT don't always play nice. Data handoffs between tools isn’t always seamless. We're actively improving this integration.
  1. QGIS isn't cloud-native. Desktop collaboration sounds tricky, right? PostgreSQL saves us—team edits appear instantly for everyone, creating one shared source of truth.
  1. The learning curve is steep. QGIS and PostGIS aren't beginner-friendly, which can slow down onboarding for new staff or clients. To overcome this, we have structured internal docs and clear workflows. The ongoing? We are connecting our resources to an LLM that answers questions directly from our documentation—speeding up onboarding significantly.
  1. Multiple layers from one table? Solved. Instead of creating endless database tables, we use QGIS filters and expressions. One PostGIS table becomes multiple QGIS layers. Lighter, cleaner, more flexible.
QGIS filter applied
  1. Data consistency is a constant battle. Coordinate systems don't match. Attribute fields disagree. We've built validation checks, but sometimes human eyes still catch what automation misses.
  1. Opening heavy projects takes forever. We’re working on automation to allow printing map layouts directly to PNG files from the command line. No need to load the full QGIS GUI. Plus, we are investigating how to create automated routines on Python to handle layer imports into the specific project schema.
  1. Writing reports eats time. Our solution? LLMs. Map creators add key findings (metadata) directly to the layout, and our plugin exports both, the map and this metadata. The LLM then extracts it to automatically generate report sections.
  1. Hidden database connections slow everything down. We monitor connections via pg_stat_activity, identify team members by IP, and kill idle sessions. Same network environment = fewer redundant connections.
Query pg_stat_activity to list all idle connections with user, IP, and last activity time.
Terminate idle connections from a specific IP that have been idle for more than 50 minutes.
  1. Diverse datasets across databases = import headaches. We use GDAL scripts to migrate only needed study areas (not entire datasets), auto-validating keys and indexes. Data arrives clean and analysis-ready in EPSG:4326, with validated primary keys and spatial indexes.

Areas of application at P4B

Our projects vary across public transport and active mobility planning to energy  system analysis. We've worked on the calculation of public transport quality in Schleswig-Holstein, the creation of an Energy District Concept for Altrip, and the Active Mobility Concept for Allach-Untermenzing (Munich), among other projects.

Project map on QGIS

How is your GIS data analysis workflow with QGIS?

We hope this was an interesting behind the scenes and gave you a clear picture of how P4B combines QGIS with our tools to create a seamless data analysis and visualization workflow.  The beauty of this workflow lies in its flexibility.  While QGIS provides the foundational mapping capabilities, our custom plugins and PostGIS integration allow us to tackle complex planning challenges with precision.  Let us know if we can help optimize your data analysis and visualization workflow, we'd love to hear about your projects and how we might be able to support them.

If you're curious about how we've applied these and other techniques, check out our References section or follow along with our LinkedIn posts. And if you have questions about how we might work together, don't hesitate to reach out.

Map
People on bicycles
People on bicycles

Let's create sustainable communities!

Whether you need state-of-the-art GIS technology, extensive datasets or expert advice – we are ready to help you shape a sustainable and liveable future for  our community.

Make an Appointment