# Spatial analysis

{% embed url="<https://www.youtube.com/watch?v=MudknS9d-y0>" %}

Manipulate and analyze geographic data to extract meaningful insights. Combine layers, identify patterns, and discover spatial relationships to make informed decisions.

## Using spatial analysis

To perform analysis on layers, click on the ![](/files/Fyd9uldsRFuFDMCAtwkN) **Spatial analysis** tool in the toolbar, or use the **`Command/Control + K`** keyboard shortcut and type **Spatial analysis** or the name of any specific analysis, like **Buffer**.

## Available methods

{% hint style="warning" %}
Processing large layers could take time. Consider clipping large layers to your area of interest before running other operations.
{% endhint %}

| Name             | Description                                                                           | Example use case                                                                                        | Input                     | Output                                              |
| ---------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------- | --------------------------------------------------- |
| **Buffer**       | For each feature, generate a polygon covering an area within a distance               | To identify specific locations that are within a certain radius of features like roads, hospitals, etc. | Any                       | Polygons                                            |
| **Bounds**       | For each feature, generate a rectangular polygon completely covering the feature      | To simplify features to broad coverage areas                                                            | Any                       | Polygons                                            |
| **Centroid**     | For each feature, generate a point at the center of it                                | To simplify a polygon layer to a point layer, like metro areas to just cities                           | Lines or polygons         | Polygons                                            |
| **Clip**         | Keep only the parts of each feature inside polygons from another layer                | To reduce a global or countrywide layer to just an area of interest                                     | Any and polygons          | Any (same as input)                                 |
| **Count Points** | Add the total number of points covered by each polygon to each feature                | Count the number of airports in each US state                                                           | Points and polygon layers | Polygon layer with number of points as an attribute |
| **Dissolve**     | Create a single new polygon covering all features                                     | To simplify overlapping or contiguous polygons, like buffers                                            | Polygons                  | Polygons                                            |
| **Intersect**    | Keep only the features in layer A that intersect layer B                              | To identify features that overlap another layer, like roads inside national parks                       | Any and polygons          | Any (same as input)                                 |
| **Subtract**     | Keep only the parts of each feature outside the polygons from another layer           | Remove flood zones from candidate areas for development projects                                        | Any and polygons          | Any (same as input)                                 |
| **Join**         | For each feature, generate a new one that includes the columns from both input layers | To add non-geographic data to a geographic layer, like GDP per year to a countries layer                | Any and any               | Any (same as input)                                 |

{% hint style="info" %}
When using the Join tool always choose the layer with the target output geometry as the first layer in the dropdown menus of the analysis tool. When working with a non-spatial (tabular) layer, make sure to configure that table as the *second layer* in the menu.
{% endhint %}

## Spatial analysis exercise

Try out Felt’s spatial analysis tools for yourself in this step-by-step tutorial to find suitable habitat for the Iberian Lynx!

Download the datasets: <https://drive.google.com/drive/folders/1eKmVEg1hZk8TlVnQPu150oaTQNu07YkX>

{% embed url="<https://www.youtube.com/watch?v=97NX-lqZjtU>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.felt.com/layers/spatial-analysis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
