> For the complete documentation index, see [llms.txt](https://docs-jmapserver-lima.k2geospatial.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-jmapserver-lima.k2geospatial.com/e/extensions/edition/i-wish-to.../perform-spatial-operations/spatial-tools.md).

# Spatial Tools

Spatial operations are performed on one or more selected elements.&#x20;

{% hint style="info" %}
A spatial operation results in a new geometry added to the **Annotations** layer.
{% endhint %}

When you perform spatial operations on editable elements, you can press and hold down the **CTRL** key to keep only the results of the operation, i.e. automatically deleting the editable elements that were selected.

## Buffer

Creates a buffer zone around the selected map elements.&#x20;

You can create the buffer zone for each element individually or a buffer zone for all elements.

1. Select the desired elements and press![](https://content.gitbook.com/content/DUF1p2rT0hfE3QBlbbvE/blobs/7DT0uRPdFpr7BG5S1DYG/spatialbuffer.png).&#x20;
2. You must then specify the size of the buffer, i.e. the maximum distance between any point of the buffer and the selected elements. \
   The size can be negative, in which case the buffer can be smaller than the selected elements. \
   The size of the buffer is indicated in the map's unit of distance.
3. Keep **Generate a buffer for each selected element** checked if you want this type of buffer.&#x20;
4. Specify the precision of the buffer arcs, in degrees.&#x20;
5. Press **OK**. The example shows a 100 m buffer around each park in a city.<br>

   <figure><img src="https://content.gitbook.com/content/DUF1p2rT0hfE3QBlbbvE/blobs/BtWyduwb28Jd5cD4epDi/tampon1.png" alt=""><figcaption></figcaption></figure>
6. Uncheck **Generate a buffer for each selected element** if you wish a single buffer to be generated for the set of selected elements.&#x20;
7. Specify the precision of the buffer arcs, in degrees.&#x20;
8. Press **OK**. The example shows a 100 m buffer around parks in a city.<br>

   <figure><img src="https://content.gitbook.com/content/DUF1p2rT0hfE3QBlbbvE/blobs/wHWvJEiOxFq7ZAKLdiVa/tampon2.png" alt=""><figcaption></figcaption></figure>

## Union

Creates a new element by uniting the selected elements.&#x20;

Select at least 2 elements and press ![](https://content.gitbook.com/content/DUF1p2rT0hfE3QBlbbvE/blobs/P2QH7tsy3oJTlRHWcXvo/spatialunion.png).

<figure><img src="https://content.gitbook.com/content/DUF1p2rT0hfE3QBlbbvE/blobs/3RqTPciSpkIrwgd1Vcyk/union1.png" alt=""><figcaption></figcaption></figure>

## Intersection

Creates a new element that is the intersection of the selected elements.&#x20;

Select at least 2 elements and press ![](https://content.gitbook.com/content/DUF1p2rT0hfE3QBlbbvE/blobs/0HBXm6nJz3fAocnXM0S3/spatialintersect.png).

<figure><img src="https://content.gitbook.com/content/DUF1p2rT0hfE3QBlbbvE/blobs/5tH094HujTZCrFWvnOz1/intersection1.png" alt=""><figcaption></figcaption></figure>

## Difference

Creates a new map element that is the difference between the first selected element and the others. In other words, all elements are subtracted from the element that was selected first.&#x20;

Select at least 2 elements and press ![](https://content.gitbook.com/content/DUF1p2rT0hfE3QBlbbvE/blobs/Lw5IzwPSTCietgMAcBji/spatialdifference.png).

<figure><img src="https://content.gitbook.com/content/DUF1p2rT0hfE3QBlbbvE/blobs/BxWU0B4YV5LYqb07SxD1/difference1.png" alt=""><figcaption></figcaption></figure>

## Elementary polygons

Creates new elements resulting from the intersection of two polygons.

Select the two polygons and press ![](https://content.gitbook.com/content/DUF1p2rT0hfE3QBlbbvE/blobs/S4nMNZbSsDTD9290Bhwa/poly_elementaire_bouton.png).

<figure><img src="https://content.gitbook.com/content/DUF1p2rT0hfE3QBlbbvE/blobs/V1UsSws8sAQS6IDzezIr/poly_elementaire.png" alt=""><figcaption></figcaption></figure>

## Split polygon

Creates new elements resulting from the splitting of a polygon using a line.&#x20;

Select a polygon and a line that come from two different layers and press ![](https://content.gitbook.com/content/DUF1p2rT0hfE3QBlbbvE/blobs/BFP8zmYA9l0U93rTPTGM/poly_division_bouton.png).

<figure><img src="https://content.gitbook.com/content/DUF1p2rT0hfE3QBlbbvE/blobs/iWR2QY439itJ1P45TPLb/poly_division.png" alt=""><figcaption></figcaption></figure>

## Convex

Creates a new element that is the smallest convex polygon that entirely covers the selected elements.

Select the elements and press ![](https://content.gitbook.com/content/DUF1p2rT0hfE3QBlbbvE/blobs/zw4EP1SZDMcbCkM0uKgp/spatialconvex.png).

<figure><img src="https://content.gitbook.com/content/DUF1p2rT0hfE3QBlbbvE/blobs/4eCqEBqYcjXpCYOjU67z/convexe1.png" alt=""><figcaption></figcaption></figure>
