> For the complete documentation index, see [llms.txt](https://docs.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.k2geospatial.com/en2/jmap-server-extensions/edition/jmap-edition-user-guide/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;

1. Select the desired elements and press![](https://2098443701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcA9CuUnY5hTYroiPhD1w%2Fuploads%2F31Ne6eJZH6nVOP6o056i%2Fspatialbuffer.png?alt=media\&token=d9c20f27-a9f8-4122-b6cf-2471f7aad6f3).&#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://2098443701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcA9CuUnY5hTYroiPhD1w%2Fuploads%2FEHOf8EjFJiZX8pfITDLX%2Ftampon1.png?alt=media&amp;token=243cffc1-58f3-49e0-b151-3a85ad13e5ce" 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://2098443701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcA9CuUnY5hTYroiPhD1w%2Fuploads%2FXwsi48Pk6Dwgdasentpv%2Ftampon2.png?alt=media&amp;token=24572f18-4907-4f5a-8d7b-3ea3706aa728" alt=""><figcaption></figcaption></figure>

## Union

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

Select at least 2 elements and press ![](https://2098443701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcA9CuUnY5hTYroiPhD1w%2Fuploads%2Fr3q2FeJWLQgPS94fqt29%2Fspatialunion.png?alt=media\&token=0fb7f5a6-a42f-4e15-b024-9e50636f75c7).

<figure><img src="https://2098443701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcA9CuUnY5hTYroiPhD1w%2Fuploads%2FClXtSebEoz4gzYb7dKln%2Funion1.png?alt=media&amp;token=51a66587-c4fd-4e6c-aa2b-2552a89cd1ff" 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://2098443701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcA9CuUnY5hTYroiPhD1w%2Fuploads%2FLxo9XSRnTGtmETsj22n0%2Fspatialintersect.png?alt=media\&token=78dca8f0-e509-473e-9315-c29c9a43f962).

<figure><img src="https://2098443701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcA9CuUnY5hTYroiPhD1w%2Fuploads%2FOWncpdYJax4aoHdfG4dc%2Fintersection1.png?alt=media&amp;token=f7a451ab-b647-4f76-bdfa-3b6a51f6fb36" 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://2098443701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcA9CuUnY5hTYroiPhD1w%2Fuploads%2FPIJpoTKbHuOg3oo9do5X%2Fspatialdifference.png?alt=media\&token=266849cc-9ac6-49a5-be47-4723336e27bc).

<figure><img src="https://2098443701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcA9CuUnY5hTYroiPhD1w%2Fuploads%2FPn6WP81ItMB3cKmqTr44%2Fdifference1.png?alt=media&amp;token=184a2f14-5ddb-46a5-946b-611cb13aa9e5" alt=""><figcaption></figcaption></figure>

## Elementary polygons

Creates new elements resulting from the intersection of two polygons.

Select the two polygons and press ![](https://2098443701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcA9CuUnY5hTYroiPhD1w%2Fuploads%2FCs9KeahBUATKan89zjui%2Fpoly_elementaire_bouton.png?alt=media\&token=f1e75d55-e0eb-4f18-aaae-042b9a78d14a).

<figure><img src="https://2098443701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcA9CuUnY5hTYroiPhD1w%2Fuploads%2Fuwei0QofLEyBT6tf3lqv%2Fpoly_elementaire.png?alt=media&amp;token=00d0caf0-6e98-4676-b6b6-2406fa70a383" 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://2098443701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcA9CuUnY5hTYroiPhD1w%2Fuploads%2F44PX459AiFTgXHI6jgtz%2Fpoly_division_bouton.png?alt=media\&token=be7883fb-e883-4235-8138-82a6cb8f9bde).

<figure><img src="https://2098443701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcA9CuUnY5hTYroiPhD1w%2Fuploads%2Fw1Zu7QGT9vxDBt8w6spC%2Fpoly_division.png?alt=media&amp;token=a8e49ddc-975d-4cab-8859-7eb56567f169" 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://2098443701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcA9CuUnY5hTYroiPhD1w%2Fuploads%2FEojO0dVG4lO3ZCGCcLom%2Fspatialconvex.png?alt=media\&token=638db2c3-bc0b-49ef-b6de-63d2036ae8b7).

<figure><img src="https://2098443701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcA9CuUnY5hTYroiPhD1w%2Fuploads%2FhZgWkV0S1IIK7ZhQIBfE%2Fconvexe1.png?alt=media&amp;token=1eebeafe-45ff-4d06-80dd-63593f372583" alt=""><figcaption></figcaption></figure>
