Fixes
Targeted fixes for the most frustrating Python GIS errors — from a failed install to a batch job that stops at file seven.
Python GIS errors tend to fall into a small number of repeating patterns. A CRS mismatch silently breaks a spatial join. A Fiona import error stops GeoPandas from loading entirely. A memory error crashes the script halfway through a large dataset. These guides diagnose the root cause and give you a concrete fix.
The collection now follows the learning paths all the way into production. Alongside the classic GeoPandas errors you will find the failures that only appear once a workflow runs unattended: a batch loop that dies on one bad file, outputs that overwrite each other, a scheduled script that works in your terminal and not from cron, a YAML config that will not load, a pipeline that reports success while producing nothing, and PyQGIS scripts that segfault or return an empty layer.
Each guide explains why the error happens — not just what command to run. Understanding the cause means you can avoid the same problem next time and adapt the fix to slightly different situations. If you are hitting an error you have not seen before, start with the guide closest to your symptoms.
Browse by topic
The fastest way in. Each topic page pairs these fixes with the concepts that explain them and the tasks they interrupt.
- Getting started Fundamentals 5 fixes
- Files & formats Fundamentals 24 fixes
- Data sources & downloads Fundamentals 7 fixes
- Geocoding & addresses Fundamentals 6 fixes
- Geometry & topology Geometry & space 14 fixes
- CRS & projections Geometry & space 22 fixes
- Joins & relationships Geometry & space 8 fixes
- Networks & routing Geometry & space 5 fixes
- 3D & buildings Geometry & space 5 fixes
- H3 & global grids Geometry & space 5 fixes
- Satellite imagery Imagery & point clouds 4 fixes
- LiDAR & point clouds Imagery & point clouds 3 fixes
- Gridded & climate data Imagery & point clouds 5 fixes
- Data cleaning Analysis 20 fixes
- Raster & rasterio Analysis 11 fixes
- Maps & visualisation Analysis 15 fixes
- Spatial statistics Analysis 8 fixes
- Census & demographics Analysis 6 fixes
- Terrain & elevation Analysis 11 fixes
- Hydrology & watersheds Analysis 5 fixes
- Movement & time Analysis 3 fixes
- Web maps & tiles Analysis 7 fixes
- Cartography & map design Analysis 5 fixes
- Coastal & marine Analysis 5 fixes
- Agriculture & vegetation Analysis 5 fixes
- Spatial machine learning Modelling & prediction 4 fixes
- Interpolation & surfaces Modelling & prediction 4 fixes
- Location & accessibility Modelling & prediction 5 fixes
- Batch processing Production 8 fixes
- Pipelines & automation Production 10 fixes
- Performance & scale Production 20 fixes
- Cloud-native formats Production 4 fixes
- Testing, CI & Docker Production 5 fixes
- APIs & tile services Delivery & sharing 5 fixes
- Apps & dashboards Delivery & sharing 5 fixes
- Privacy & sensitive locations Governance & trust 5 fixes
- Metadata, licensing & provenance Governance & trust 5 fixes
- QGIS & PyQGIS Tools 6 fixes
- PostGIS & databases Tools 4 fixes
- DuckDB & analytic SQL Tools 5 fixes
Or follow a learning path
Curated routes in the order that builds on itself — concepts first, then each task, then the errors it produces.
-
Finding & Fetching Data
Get the data before you analyse it — from OSM, web services and satellite catalogues.
3 of its 14 steps are fixes → -
Spatial Statistics
Measure the pattern instead of eyeballing the map.
3 of its 13 steps are fixes → -
Terrain & Elevation
Turn a grid of heights into slope, shade, contours and drainage.
3 of its 12 steps are fixes → -
Networks & Routing
Distance along the street, not across the rooftops.
3 of its 11 steps are fixes → -
Raster Analysis
Read, reproject, clip and summarise raster data in Python.
4 of its 14 steps are fixes → -
Spatial SQL & PostGIS
Move the heavy lifting from Python into the database.
4 of its 15 steps are fixes → -
Making Maps
Turn a GeoDataFrame into a map someone else can read.
3 of its 13 steps are fixes → -
GIS Data Cleaning
Turn messy spatial data into analysis-ready datasets.
13 of its 33 steps are fixes → -
Batch Processing
Process many files at once, reliably.
5 of its 26 steps are fixes → -
Automation & Pipelines
Build repeatable, config-driven GIS pipelines.
5 of its 26 steps are fixes → -
QGIS Automation
Automate QGIS with PyQGIS and Processing models.
6 of its 25 steps are fixes → -
Satellite Imagery
From a scene on a catalogue to a number you can defend.
3 of its 16 steps are fixes → -
LiDAR & Point Clouds
Millions of points, and the surfaces worth deriving from them.
3 of its 14 steps are fixes → -
Cloud-Native GIS
Read the part you need, not the file it lives in.
3 of its 14 steps are fixes → -
Publishing Web Maps
Get the data into a browser without shipping the whole dataset.
3 of its 15 steps are fixes → -
Movement & Time
Tracks are not points — the order and the clock are the data.
2 of its 14 steps are fixes → -
Spatial Machine Learning
Why the usual rules break, and what to do instead.
3 of its 14 steps are fixes → -
Interpolation & Surfaces
A continuous surface from scattered samples, with its support attached.
3 of its 13 steps are fixes → -
Geocoding & Addresses
Address text is data too — and it is the messiest data in the file.
5 of its 20 steps are fixes → -
Cartography & Map Design
The map is correct. Now make it readable.
5 of its 20 steps are fixes → -
DuckDB for Spatial Data
A spatial database with no server, reading the file you already have.
5 of its 20 steps are fixes → -
Serving Spatial Data
The dataset is finished. Now other people need it over HTTP.
5 of its 20 steps are fixes → -
Maps, Apps & Dashboards
Let the reader ask their own question — within a budget.
5 of its 20 steps are fixes → -
Gridded & Climate Data
A raster with a time axis, a calendar and forty years in one file.
5 of its 20 steps are fixes → -
H3 & Global Grids
Give every point a cell id and half the geometry work becomes a join.
5 of its 20 steps are fixes → -
Census & Demographics
The most-used open data there is, and the easiest to map wrongly.
5 of its 20 steps are fixes → -
Location & Accessibility
Who can reach what — and where the next site should go.
5 of its 20 steps are fixes → -
Hydrology & Watersheds
A DEM already knows where the water goes. Ask it carefully.
5 of its 20 steps are fixes → -
Geoprivacy & Anonymisation
A coordinate is an identifier. Release it as if it were one.
5 of its 20 steps are fixes → -
Metadata, Licensing & Provenance
A layer nobody can describe, cite or re-run is a layer nobody should use.
5 of its 20 steps are fixes → -
3D & Buildings
A footprint plus a height is not a building, but it is most of one.
5 of its 20 steps are fixes → -
Coastal & Marine
The shoreline is a choice of datum, not a line on a map.
5 of its 20 steps are fixes → -
Agriculture & Crops
One field, one season, and a dozen ways to measure it wrong.
5 of its 20 steps are fixes →
Every fix, A–Z
165 guides in total. Showing 1–30, page 1 of 6.
- A 3D viewer shows nothing or a black screen 3d viewer shows nothing
- A building mesh is not watertight and its volume is wrong mesh not watertight volume
- A coastline or EEZ breaks at the antimeridian antimeridian polygon problem
- A crop classifier confuses two crops every year crop classifier confuses classes
- A downloaded layer has no licence you can find layer has no licence
- A LAZ File Will Not Open in Python laz file will not open
- A prescription map is rejected by the machine controller prescription map not loading
- A shared file still contains the original coordinates file still contains original coordinates
- A STAC item is rejected by the validator stac item validation error
- A yield map has impossible values and stripes yield map stripes impossible values
- AIS tracks jump across the world ais track jumps
- An inundation map floods inland areas that cannot flood bathtub inundation wrong
- Anonymised points still identify individuals anonymised points still identify
- Batch GIS Job Slows Down and Runs Out of Memory: How to Fix It batch job memory leak python
- Batch Job Gives Different Results Each Run: How to Fix It gis batch non deterministic output
- Batch Output Files Keep Overwriting Each Other: How to Fix It batch output files overwriting
- Batch Script Stops at the First Bad File: How to Keep It Running batch script stops on error
- Bathymetry depths are positive in one file and negative in another bathymetry sign convention
- buffer(0) Does Not Fix My Invalid Geometry: What to Do Instead buffer 0 not fixing geometry
- Cannot Transform Naive Geometries to CRS: How to Fix It in GeoPandas cannot transform naive geometries
- CityJSON coordinates come out tiny or at the origin cityjson coordinates wrong
- Contours Come Out Jagged or Full of Tiny Rings contours jagged noisy
- CRS Not Found Error in GeoPandas: Causes and Fixes crs not found geopandas
- dask-geopandas Uses More Memory or Time Than Plain GeoPandas dask geopandas slower than geopandas
- DBSCAN Returns One Giant Cluster or Labels Everything Noise dbscan one cluster
- Delineated field boundaries merge fields or swallow roads field delineation merges fields
- Extruded buildings float above or sink into the ground extruded buildings float terrain
- Feature Importance Says Coordinates Are the Best Predictor coordinates dominate feature importance
- Fiona ImportError When Using GeoPandas: How to Fix It fiona importerror geopandas
- Fixing 429 Too Many Requests When Geocoding geocoding 429 rate limit