
Intersection in QGIS: Overlaps and Attributes
What you'll learn
- How to extract the intersecting parts of vector layers in QGIS
- Parameter settings for the intersection operation
- Practical uses of intersection and how to interpret the results
Recommended for
- Anyone who wants to learn spatial analysis operations
- Anyone who wants to extract data that overlaps polygon data
Introduction
In GIS data analysis, you often want to extract only the parts where different layers overlap. For example, you may want to calculate the area of forest land that intersects each mesh cell, or find the length of rivers that intersect each municipality. The geoprocessing operation for extracting these “overlapping (intersecting) parts” is Intersection. This article covers Intersection in QGIS, from the basic idea to the steps for running it and how to read the results.
What is intersection?
Intersection is a spatial operation that extracts only the parts where two or more vector layers overlap in space. It looks similar to clipping at first, but the key difference is that the attributes of the output include not only those of the input layer but also those of the overlay layer used for the extraction.
When you run Intersection with a polygon layer (with multiple features) as the overlay layer, the output splits the input data along the boundaries of the polygon features.
This lets you tell “which area of the overlay layer each part overlapped” from the output.

Run an intersection
Running Intersection requires the following two layers:
-
Input layer
The vector data you want to cut out. Points, lines, and polygons all work as input.
-
Overlay layer
The data used to determine the intersection. The parts of the input layer that intersect this overlay layer are extracted as the output.
The example below runs Intersection on the railway lines (line data) for all of Japan and the administrative areas (polygon data) of Tokyo, both downloaded from the National Land Numerical Information Download Service.

The railway line data downloaded from National Land Numerical Information covers the whole country, so it includes railway lines across all of Japan.

From the menu bar at the top of the window, choose Vector → Geoprocessing Tools → Intersection.

You can also open the Processing Toolbox on the right side of the main window and search for intersect to start the tool.

Set the following options for the intersection.

-
Input layer
Select the vector layer to test for intersection from the drop-down list. The list shows the layers currently loaded in the project.
-
Overlay layer
Select the other vector layer for the intersection test. The input layer is cut to the shape of this layer.
-
Input fields to keep
Select the attribute fields to carry over from the input layer to the result. If you change nothing, all attributes are carried over.
-
Overlay fields to keep
Select the attribute fields to carry over from the overlay layer to the result. If you change nothing, all attributes are carried over.
-
Advanced Parameters
- Overlay fields prefix: Adds a prefix to the column names of the attributes that the output layer inherits from the overlay layer.
- Grid size: If you specify a value, the output layer is snapped to a grid of the specified size.
-
Intersection
Specify where to save the result. To keep it as a temporary layer, choose Create Temporary Layer. To save it as a file, click the ... button and specify the location and file name.
Check the intersection result
The railway lines are cut out to the area of Tokyo. The result looks similar to clipping, but the attribute table shows that the output layer has the attributes of both the input layer and the overlay layer.


The overlay layer this time is polygon data with one feature per municipality in Tokyo. So the output layer also carries the municipality name (the N03_004 column). If you color the features by the municipality name column, you can also see which municipalities each railway line passes through.

Use cases for intersection
Calculate the area for each individual area
For example, suppose you set up square plots in the target area, as in the image, and want to know how much forest area each plot contains. Run Intersection on the forest area polygons and the grid.

The result is forest area polygons split by grid cell. The attribute table also keeps the grid's id numbers.

With the result in this state, calculate the area of each polygon and total the areas by grid ID to get the forest area in each grid cell.

Extract the shared sections of line data
If you run Intersection on two line layers, you can extract the sections the two lines share. For example, you can use it to detect where buried water and sewer pipes interfere with planned road work.
In this case, the two lines must overlap at the same position. Note that if one line only crosses the other, or if the lines are slightly offset, the sections are not extracted.

Conclusion
Intersection is one of the basic and important geoprocessing operations in GIS. With Intersection, you can extract the shared parts of two datasets while keeping the attributes of both. Note, however, that because features are split and the data becomes finer, processing takes longer and the output data is larger than with clipping.
Data sources


QGIS LAB is a comprehensive information hub for QGIS, the open-source GIS software. Under the concept of “Geospatial for Greater Good,” we share the knowledge and skills to open up the world through location data.


