Buffer, Clip, Intersect, Union: Overlay Tools Explained

Buffer, Clip, Intersect, Union: Overlay Tools Explained

There is a diagram I draw on the whiteboard at the start of every spatial analysis course: two overlapping circles, like a Venn diagram. Then I ask the room, “If I want only the part where they overlap, which tool do I use? And if I want everything from both? And if I want one circle with the other bitten out of it?” The answers separate the people who know their tools from those who click and hope. A surprising number of professionals, even after years of experience, hesitate between Clip and Intersect, or Union and Merge.

These tools are the vocabulary of GIS. Almost every analysis you will ever do, from flood risk to site selection, is a sentence built from them. In this guide I’ll explain each one in plain language, show what happens to the geometry and, crucially, to the attributes, and share the practical traps that I have watched colleagues fall into for three decades.

If you want the broader context first, read Spatial Analysis in GIS: Complete Guide. Here we go deep on the core toolbox.

Illustration: Each overlay tool answers a different question about two layers.
Each overlay tool answers a different question about two layers.

The Big Idea: Overlay

Overlay means combining two or more layers to produce a new layer that reflects how they relate in space. It’s the digital descendant of laying transparent map sheets on a light table, an idea popularized by landscape planners long before computers could do it.

Overlay tools fall into two families:

  • Proximity tools, such as Buffer, which create new geometry around features based on distance.
  • Overlay (geometric set) tools, such as Clip, Intersect, Union, Erase and Dissolve, which combine layers using set logic: overlap, union and difference.

Before we start, one rule applies to all of them: layers must share the same coordinate system, and for distance-based tools it must be a projected CRS with meaningful units. Everything else in this article assumes you have checked that first. If you want a refresher, see Coordinate Reference Systems (CRS) Explained Simply.


Buffer: Creating Zones Around Features

What it does

A buffer creates a polygon around each feature, at a specified distance. Buffer a river by 100 meters and you get a protection corridor. Buffer a school by 300 meters and you get a safety zone. Buffer a hospital by 5 kilometers and you get an approximate catchment.

What it produces

Always polygons, whatever the input: points become circles, lines become corridors, polygons grow (or shrink, with a negative distance).

Options that matter

  • Fixed distance: the same value for every feature. The simplest case.
  • Variable distance: the distance comes from an attribute. A road buffer wider for motorways than for streets, a noise zone that depends on the source’s power.
  • Multiple rings: concentric buffers at several distances (100, 200, 500 meters), useful to show gradients of exposure.
  • Dissolve: whether overlapping buffers are merged into a single shape, or kept separate. Dissolve gives you “the total area within 300 m of any school”, while keeping them separate gives you one zone per school.
  • Sides: for lines, you can buffer only the left or right side.
  • Ends and joins: round or flat line ends, and how corners are shaped.
  • Segments: how many straight segments approximate a curve. More segments mean smoother circles and bigger files.
  • Negative buffers: shrink a polygon inward, for example to find the interior of a parcel beyond a setback.

The two traps

  1. Units. A buffer distance is in the units of the layer’s CRS. In latitude and longitude, “500” means 500 degrees, which is nonsense. Always reproject to a suitable projected system first. For a very large area, use a geodesic buffer (calculated on the curved Earth) when your software offers it.
  2. Straight lines are not travel. A buffer measures straight-line distance. For real accessibility along roads, you need network analysis, described in Network Analysis and Route Optimization.

Clip: Cutting One Layer With Another

What it does

Clip cuts the input layer using the outline of a clip layer, like a cookie cutter. Only the parts of the input that fall inside the clip polygons survive.

What happens to attributes

Only the input layer’s attributes are kept. The clip layer is just a shape. This is the key difference from Intersect.

Typical uses

  • Extract the roads, buildings or land cover inside a study area.
  • Reduce a huge national dataset to your region, making everything faster.
  • Cut a raster to a boundary, also called “extract by mask”.

Remember

  • The clip layer should be polygons.
  • Features that straddle the boundary are cut, which means their area and length change. If you need to preserve whole features, use select by location instead of Clip.

Intersect: Keeping Only What Overlaps

What it does

Intersect keeps only the areas (or parts of features) that are present in both layers. Think of the center of the Venn diagram.

What happens to attributes

The output carries the attributes of both layers. Each resulting piece knows what it was in layer A and in layer B at the same time. This is what makes Intersect so powerful.

Typical uses

  • Which parcels fall in which flood zone? Intersect parcels with flood zones, then the output has parcel ID and flood class, with the area of each piece.
  • Which land cover lies in which municipality? Intersect and then summarize area by municipality and cover type.
  • Where do roads cross protected areas?

Clip vs. Intersect: the question everyone asks

  • Clip: one layer is a cutter. You keep the input’s attributes only.
  • Intersect: both layers are peers. You keep both sets of attributes, and the output geometry type follows the lowest dimension of the two (for example, polygons with lines produces lines).

A simple test: do you need the attributes of the second layer? If yes, Intersect. If no, Clip.


Union: Keeping Everything

What it does

Union combines two polygon layers into one that covers the whole extent of both. Areas that overlap are split into pieces, and every piece is kept, whether it came from A only, B only, or both.

What happens to attributes

All attributes of both layers are in the output. Pieces that came from only one layer have empty (NULL) values for the other layer’s fields. That gives you a complete map of “what is what”, including where something is missing.

Typical uses

  • Combine soil and land use polygons into one layer of unique combinations, as a first step in a suitability analysis.
  • Merge administrative boundaries from two years to study changes.
  • Build the full picture of who owns, zones or restricts each piece of land.

Union vs. Merge

These words are confused constantly:

  • Union is a geometric overlay. It splits overlapping polygons and keeps the pieces and attributes of both. The output has no overlaps.
  • Merge (or “append”) just stacks features from several layers into one, without computing overlaps. Overlapping features remain overlapping.

If your goal is simply to combine adjacent datasets of the same kind, such as the tiles of a national dataset, you want Merge.


Erase / Difference: Removing Part of a Layer

What it does

Erase (called Difference in QGIS) removes from the input layer the areas covered by another layer. Think of biting a piece out of the first circle.

Attributes

Only the input layer’s attributes remain.

Typical uses

  • Remove no-go areas from a candidate zone: erase protected areas, flood zones and water bodies from the land available for development.
  • Find what is outside: the part of a district not covered by a service area.

Symmetrical Difference: Everything Except the Overlap

Symmetrical difference keeps the areas that are in one layer or the other, but not both. Think of the Venn diagram with the center removed. It is used to find where two layers disagree, for example to compare a land cover map from two dates and see where it changed.


Dissolve: Merging Features by Attribute

What it does

Dissolve merges features that share the same attribute value, or all features if you don’t choose one, into larger features. Adjacent boundaries vanish.

Typical uses

  • Merge municipalities into regions, using a region code.
  • Combine all buffer polygons into a single shape.
  • Simplify a layer of many small polygons with the same class.

Attributes

You choose which fields to keep and how to summarize numeric ones, such as the sum of population or the mean of a value. If you forget this, the numbers may disappear or be misleading.


Other Overlay Tools You Will Meet

  • Identity (ArcGIS): keeps all features of the input, and adds attributes from the overlay layer where they overlap, splitting features at the boundaries. It’s like a Union restricted to the extent of the input.
  • Update (ArcGIS): replaces parts of the input with the geometry and attributes of another layer.
  • Spatial join: transfers attributes from one layer to another based on a spatial relationship, without cutting the geometry.
  • Split: divides features using lines or polygons.
  • Select by location: picks features by their relationship to another layer, without changing any geometry.

Comparison at a Glance

ToolGeometry resultAttributes keptTypical question
BufferPolygons around featuresInput’sWhat is within this distance?
ClipInput cut by the clip shapeInput onlyWhat is inside my study area?
IntersectOnly the overlapping partsBoth layersWhat is in both, and what are both attributes?
UnionAll parts of both, split at overlapsBoth layers, with NULLsWhat is the full combination?
Erase / DifferenceInput minus the overlayInput onlyWhat remains after removing this?
Symmetrical differenceParts in one layer but not bothBoth layersWhere do they differ?
DissolveFeatures merged by attributeChosen and summarizedHow do I combine by category?

Putting the Tools Together: A Worked Example

Question: how much agricultural land lies within 200 meters of a river, but outside protected areas, in each municipality?

  1. Prepare all layers in the same projected CRS, and repair invalid geometries.
  2. Buffer the rivers by 200 meters, with dissolve enabled to avoid double counting.
  3. Erase the protected areas from the river buffer, leaving the riparian zone outside protection.
  4. Clip the land cover layer to your study area, and select the agriculture class.
  5. Intersect agricultural land with the buffered, unprotected zone. The output pieces carry land cover attributes and the zone attributes.
  6. Intersect (or spatially join) the result with municipality boundaries to attach the municipality name.
  7. Calculate the area of each piece in hectares, using the projected CRS.
  8. Summarize (statistics by category) the area per municipality.
  9. Map and document the result, including every input and parameter.

Notice how the question dissolved into small, simple operations. That is the real skill: breaking a question into overlay steps. Graphical modelers can save such a sequence for reuse, as described in Automating Workflows with ModelBuilder and QGIS Processing.


The Same Operations in Code

In a spatial database such as PostGIS, the overlay functions are ST_Buffer, ST_Intersection, ST_Union and ST_Difference:

-- Parcels intersected with flood zones, keeping both sets of attributes
SELECT p.parcel_id, f.flood_class,
       ST_Intersection(p.geom, f.geom) AS geom
FROM parcels p
JOIN flood_zones f ON ST_Intersects(p.geom, f.geom);

In Python, GeoPandas offers one function for the whole family:

import geopandas as gpd

parcels = gpd.read_file("parcels.gpkg")
flood = gpd.read_file("flood_zones.gpkg").to_crs(parcels.crs)

# how can be: intersection, union, identity, symmetric_difference, difference
result = gpd.overlay(parcels, flood, how="intersection")
result["area_ha"] = result.geometry.area / 10000   # valid if the CRS is in meters

The names differ across tools, but the logic is the same. See PostGIS: A Practical Introduction and Geospatial Development & Automation: The Ultimate Guide for the wider context.


Common Problems and How to Avoid Them

  • Mismatched coordinate systems. Reproject everything to one projected CRS first.
  • Invalid geometry. Overlay tools are the first to fail on self-intersections and bad rings. Run a validity check and repair before you start. See Top 10 Most Common GIS Errors and How to Fix Them.
  • Sliver polygons. Tiny, thin pieces appear when boundaries that should coincide don’t quite match. Filter them out by area, or snap boundaries beforehand.
  • Double counting. If the input polygons overlap each other, intersecting or unioning will count the overlapping area twice in summaries. Dissolve first, or resolve the overlaps.
  • Losing or inflating numbers. When a polygon is cut, its numeric attributes (population, area, value) do not automatically split. A district with a population of 10,000 cut in half still says 10,000 in both pieces. Recalculate area-based fields, and if you must apportion totals, use area-weighted allocation, aware that it assumes uniform distribution.
  • Wrong geometry type expectation. Intersecting lines with polygons gives lines, and points with polygons gives points.
  • Huge datasets. Clip to your study area first, build spatial indexes, and consider doing the work in a spatial database.
  • Forgetting field name conflicts. Both layers may have a field called “name”, and the tool will rename one. Rename fields beforehand to keep things readable.
  • Not saving intermediate outputs. Save each step as a real file or table, so you can check and rerun.

Which Tool in Which Software?

OperationQGISArcGIS Pro
BufferBufferBuffer
ClipClipClip
IntersectIntersectionIntersect
UnionUnionUnion
EraseDifferenceErase
Symmetrical differenceSymmetrical differenceSymmetrical Difference
DissolveDissolveDissolve
Identity(use Union and select, or spatial join)Identity
Merge layersMerge vector layersMerge or Append

Both applications can chain these tools in visual models, and both can call them from Python.


Final Thoughts

If you master these half-dozen tools, you can answer an astonishing share of the spatial questions people ask. The trick is to stop thinking in terms of buttons and start thinking in terms of sets: what do I want to keep, what do I want to remove, and whose attributes do I need? Once you can see the answer as a drawing of overlapping circles, the right tool announces itself.

Practice with a small, familiar dataset. Take two layers from your own area, and perform each operation, then look at the attribute tables. Seeing what happens to the data, not just to the shapes, is what turns a user into an analyst.

Where to go next: continue with Interpolation Methods (IDW, Kriging, Spline) Explained for continuous surfaces, and Network Analysis and Route Optimization for realistic distance and access.

Rachid Khouri

Rachid Khouri

Rachid Khouri is a CAD, BIM and GIS professional, Autodesk Authorized Developer, trainer and technical author with more than 30 years of experience, working with AutoCAD since 1992. He founded GISauthority.com to share practical guidance on GIS and spatial technologies.