How-To Guides
Concrete, step-by-step solutions for Python GIS tasks — from loading a shapefile to shipping a scheduled, tested, containerised pipeline.
These guides are built around specific, real-world tasks. Each one starts with a clear problem statement, gives you a quick working answer, and then walks through a complete solution with code you can copy and adapt.
They span the whole arc of a GIS workflow. The everyday operations are here — reading a shapefile, reprojecting, filtering, spatial joins, buffers, choropleths, raster extraction. So is everything that comes after: cleaning messy attributes and geometry, batch-processing whole folders, chunking datasets too large for memory, building configurable pipelines, testing them, containerising them, running them in CI, and driving QGIS itself from Python.
Every guide is self-contained, so you do not need to read them in order. If you would rather follow a route than pick a single task, the learning paths string these guides into four topic-based sequences.
Browse by topic
The fastest way in. Each topic page gathers these guides alongside the concepts behind them and the errors they cause.
- Getting started Fundamentals 5 guides
- Files & formats Fundamentals 19 guides
- Geometry & topology Geometry & space 27 guides
- CRS & projections Geometry & space 10 guides
- Joins & relationships Geometry & space 14 guides
- Data cleaning Analysis 21 guides
- Raster & rasterio Analysis 8 guides
- Maps & visualisation Analysis 10 guides
- Batch processing Production 23 guides
- Pipelines & automation Production 18 guides
- Performance & scale Production 10 guides
- Testing, CI & Docker Production 6 guides
- QGIS & PyQGIS Tools 12 guides
- PostGIS & databases Tools 8 guides
Or follow a learning path
Curated routes in the order that builds on itself — concepts first, then each task, then the errors it produces.
-
Raster Analysis
Read, reproject, clip and summarise raster data in Python.
7 of its 14 steps are guides → -
Spatial SQL & PostGIS
Move the heavy lifting from Python into the database.
7 of its 15 steps are guides → -
Making Maps
Turn a GeoDataFrame into a map someone else can read.
7 of its 13 steps are guides → -
GIS Data Cleaning
Turn messy spatial data into analysis-ready datasets.
15 of its 33 steps are guides → -
Batch Processing
Process many files at once, reliably.
16 of its 26 steps are guides → -
Automation & Pipelines
Build repeatable, config-driven GIS pipelines.
15 of its 26 steps are guides → -
QGIS Automation
Automate QGIS with PyQGIS and Processing models.
12 of its 25 steps are guides →
Every how-to guide, A–Z
123 guides in total. Showing 1–30, page 1 of 5.
- How to Add a Basemap to a GeoPandas Map with contextily geopandas basemap contextily
- How to Add a Dry-Run Mode to a Batch GIS Script dry run mode python script
- How to Add a Progress Bar and ETA to a Long GIS Batch Job python progress bar batch job
- How to Add Legends, Labels and a Scale Bar to a GeoPandas Map geopandas map legend labels
- How to Add Retries and Timeouts to an Automated GIS Job in Python python retry timeout gis job
- How to Add, Edit and Delete Features with PyQGIS pyqgis edit features
- How to Aggregate Spatial Data by Region in GeoPandas aggregate spatial data geopandas
- How to Assert on Geometry in pytest Without Flaky Comparisons pytest assert geometry equal
- How to Automate GIS Workflows with Python automate gis workflow python
- How to Automate QGIS from the Command Line with qgis_process qgis_process command line
- How to Batch Clip Many Layers to a Single Boundary in Python batch clip shapefiles boundary python geopandas
- How to Batch Convert Shapefiles to GeoPackage in Python batch convert shapefile to geopackage python
- How to Batch Export a GeoDataFrame to Multiple Formats in Python export geodataframe multiple formats python
- How to Batch Process a Folder of GIS Files in Python: The Complete Workflow batch process gis files python
- How to Batch Process Layers in QGIS with PyQGIS batch process layers pyqgis
- How to Batch Process Multiple Shapefiles in Python batch process shapefiles python
- How to Batch Process Rasters with Rasterio in Python batch process rasters rasterio python
- How to Batch-Generate a Map Image for Every Region in Python batch generate maps python
- How to Build a GIS Data Pipeline in Python: The Complete Workflow gis data pipeline python
- How to Build a QGIS Processing Model and Run It from Python qgis processing model python
- How to Build a Repeatable Data-Cleaning Report in GeoPandas data cleaning report geopandas
- How to Build a Resumable Batch GIS Job in Python resumable batch job python gis
- How to Build a Small, Fast Python GIS Docker Image small python gis docker image
- How to Build an Inventory of a GIS Data Folder in Python gis data folder inventory python
- How to Build and Save a QGIS Project File from Python create qgis project python
- How to Cache Pipeline Steps So Only Changed Data Is Reprocessed cache gis pipeline steps python
- How to Calculate Area and Distance in GeoPandas (Correctly) calculate area geopandas
- How to Calculate Zonal Statistics in Python zonal statistics python
- How to Chain GIS Processing Steps into a Reusable Pipeline in Python chain gis processing steps python
- How to Choose the Right Projected CRS for Your Study Area choose projected crs python