Geometry & topology
Clipping, buffering, dissolving and overlays — and what makes a geometry valid.
Everything on Spatial Workflow about geometry & topology, in the order that usually works: understand the idea, then run the task, then fix it when it goes wrong. 45 guides in total.
4 learning paths run through this topic — follow one if you would rather work through a route than pick a single guide.
🧭 Start with the concepts
The ideas the how-to guides below assume you already have.
- Overlay Operations in GeoPandas: Union, Intersection, Difference Explained geopandas overlay operations
- Shapely Basics: Working with Geometry Objects in Python shapely python geometry
- What Makes a Geometry Valid? The OGC Rules Explained valid geometry rules gis
- WKT, WKB and GeoJSON: How Geometry Is Actually Stored wkt wkb geojson difference
- Topology in GIS Explained: Slivers, Gaps and Shared Boundaries gis topology explained
- Coordinate Precision and Floating Point in GIS Explained coordinate precision gis floating point
- Spatial Predicates Explained: Intersects, Within, Contains and the Rest spatial predicates geopandas
- Null, Empty, Missing and Invalid: Four Kinds of Broken Geometry empty geometry geopandas
- Topological Coverage: What "Clean" Means for Adjacent Polygons polygon coverage gaps overlaps
- Why GeoPandas Is Slow: The Four Real Bottlenecks why is geopandas slow
- Projected vs Geographic CRS: What Actually Changes When You Reproject projected vs geographic crs
⚙️ Then do the task
Step-by-step walkthroughs with code you can copy and adapt.
- How to Filter Spatial Data in Python Using GeoPandas filter geopandas data
- How to Clip Spatial Data in Python with GeoPandas clip shapefile python geopandas
- How to Dissolve Polygons in Python (GeoPandas) dissolve polygons geopandas
- How to Calculate Area and Distance in GeoPandas (Correctly) calculate area geopandas
- How to Create Buffers in GeoPandas for Spatial Analysis buffer analysis geopandas
- How to Get Polygon Centroids in GeoPandas polygon centroid geopandas
- How to Count Points in Polygons with GeoPandas count points in polygon geopandas
- How to Simplify Geometry in Python with GeoPandas and Shapely simplify geometry geopandas
- How to Create a Fishnet Grid in Python with GeoPandas fishnet grid python geopandas
- How to Convert a Raster to a Vector in Python raster to vector python
- How to Convert Points to Lines in GeoPandas points to line geopandas
- How to Aggregate Spatial Data by Region in GeoPandas aggregate spatial data geopandas
- How to Remove Null and Empty Geometries in GeoPandas remove null geometries geopandas
- How to Find and Remove Duplicate Geometries in GeoPandas remove duplicate geometries geopandas
- How to Snap and Align Geometries to Fix Slivers and Gaps in Python snap geometries fix slivers python
- How to Batch Clip Many Layers to a Single Boundary in Python batch clip shapefiles boundary python geopandas
- How to Split Multipart Geometries into Single Parts in GeoPandas explode multipart geometries geopandas
- How to Find and Fix Gaps and Overlaps in a Polygon Coverage fix gaps overlaps polygons python
- How to Clean a Line Network: Dangles, Overshoots and Disconnects clean road network topology python
- How to Clip a Raster to a Polygon in Python clip raster to polygon python
- How to Rasterize a Vector Layer in Python rasterize vector python
- How to Add Legends, Labels and a Scale Bar to a GeoPandas Map geopandas map legend labels
- How to Plot Multiple Layers on One Map in GeoPandas plot multiple layers geopandas
- How to Assert on Geometry in pytest Without Flaky Comparisons pytest assert geometry equal
- How to Replace a Row Loop with Vectorised GeoPandas Operations vectorise geopandas loop
- How to Choose the Right Projected CRS for Your Study Area choose projected crs python
- How to Measure Distance Accurately in Python: Geodesic vs Projected measure distance accurately python
🔧 When it breaks
The errors this topic produces, with the cause explained rather than just the command.
- How to Fix Invalid Geometries in Python (GeoPandas) invalid geometries geopandas
- Shapely TopologyException: Found Non-Noded Intersection (How to Fix) shapely topologyexception
- GeoPandas "No Geometry Column" Error: How to Fix It geopandas no geometry column
- buffer(0) Does Not Fix My Invalid Geometry: What to Do Instead buffer 0 not fixing geometry
- Mixed Geometry Types Error When Saving a GeoDataFrame: How to Fix It mixed geometry types geopandas
- My Cleaned Layer Has More Rows Than the Original: How to Fix It geopandas more rows after cleaning
- GeoPandas .apply() Takes Hours: How to Fix It geopandas apply slow
Learning paths through this topic
A curated route rather than a list — the guides in the order that builds on itself.
-
Raster Analysis
Read, reproject, clip and summarise raster data in Python.
Open path → -
Making Maps
Turn a GeoDataFrame into a map someone else can read.
Open path → -
GIS Data Cleaning
Turn messy spatial data into analysis-ready datasets.
Open path → -
Batch Processing
Process many files at once, reliably.
Open path →
Related topics
Subjects that keep coming up alongside this one, most overlap first.