How-To Guides

Concrete, step-by-step solutions for Python GIS tasks — from loading a shapefile to shipping a scheduled, tested, containerised pipeline.

The shape of a how-to guide: the problem, the steps, the code, the explanation and the edge cases. a task end to end, with the decisions namedthe problemthe stepsthe codewhy it worksedge casescopyablethe part that transferswhat breaks itThe last two sections are what separates a guide from a snippet somebody pasted

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 ordered routes through a subject.

Every how-to guide, A–Z

Page 1 — use the page links below, or browse by topic above.

Running into errors?

If something is not working — a CRS mismatch, a batch job that stops on one bad file, a scheduled script that never runs — the fixes section has targeted answers for each of these workflows.