In a map, you can use the selection tool to perform a spatial intersection: spatial intersection allows you to select a layer’s features using another layer’s features. For instance, you could select all points inside a polygon by simply clicking on this polygon. You could also select all lines intersecting with one (or multiple) polygons for instance.
Activate Spatial intersection #
The Spatial Intersection tool is not activated by default. A Map Creator with edit permissions on the map must first enable it to allow all other map viewers to use it.
Here are the steps to activate the Spatial intersection:
- Click on the Map Settings in the top right-hand-side corner of the map
- Go to the “Advanced” tab
- Go to the “Selection” section
- Enable “Spatial intersection“.
Use the Spatial intersection #
The Spatial intersection is a form of selection, and it can be used from the Selection tool. To learn more about the standard selection tool, please see our dedicated article.
Click on the arrow of the Selection tool from the toolbar to activate the Spatial Intersection:
- Choose your target layer: this is the layer where features will be selected as a result.
- Choose your selection tool. To learn more, see our article on the selection tool.
- Enable the Spatial Intersection toggle to switch to the spatial intersection mode.
- Select the layer to be used for the Spatial Intersection. This layer is the one that will be used to perform the spatial intersection and select features from the layer defined in Step 1.
- Choose between By Centroid and By Intersection:
- By Centroid: features whose centroid is within the features used for the selection will be selected.
- By Intersection: features which intersect the features used for the selection will be selected.
When selecting a point layer, By Centroid and By Intersection will give the same results.
Once you have set the selection and spatial intersection options, click or draw on the map to select features from your target layer using the other layer. The result of your selection will be highlighted in yellow on the map, and displayed in the Data panel, Info panel and Chart panel.