Features from two input layers can be combined and intersected using the Union tool.
The tool retains all input features together with any new features created from intersections between the two input layers.
Use the Search function on the Processing Toolbox panel to locate the tool.
The tool requires two input layers and an output layer can be specified as a temporary file or as a file on disk.
In this scenario, a set of polygons is shown in green representing school catchment areas.
These are to be unioned with a study area polygon (the yellow area) –
note that this area completely covers two of the catchments and partially covers 2 others.
The union tool is used with the catchments and study area layers set as the ‘Input layers’.
With the output Union layer set, the tool is run.
The output generated is now shown.
Its attribute table confirms that this new layer has 12 polygons.
The attributes from the input layers are preserved, with the presence of NULL values providing a method for ascertaining why certain features exist.
There are three possibilities for the output features.
Possibility (1) is where the catchments exist but the study area does not;
these are identified by having NULL values in the study area fields but values in the catchments fields.
These features are selected, then saved to a new layer to make visualisation simple.
Possibility (2) is where the catchments and study area exist;
these are identified by values existing in all study area fields and catchments fields.
These features are selected, then saved to a new layer to make visualisation simple.
Possibility (3) is where the study area exists but the catchments do not;
this is identified by NULL values for the catchments fields.
These features are selected, then saved to a new layer to make visualisation simple.