> For the complete documentation index, see [llms.txt](https://1spatial.gitbook.io/fme-form-beginner/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://1spatial.gitbook.io/fme-form-beginner/transformer-usage/data-joins/spatially-based-join-transformers.md).

# Spatially Based Join Transformers

Multiple transformers can join data by spatial relationship. Which you use depends on the spatial relationship to be tested and your exact join requirements. The following are some of the key transformers.

{% hint style="info" %}
**TIP**

*Just like the key-based joining transformers, there is a flowchart to also help you choose a spatial join transformer. See the* [*Merging or Joining Spatial Data*](https://community.safe.com/s/article/performing-spatial-joins-and-merges) *article.*
{% endhint %}

## Overlayers

There are a number of different "overlayer" transformers, each handling a different form of overlay.

For example, the PointOnAreaOverlayer carries out a spatial join on points that fall inside area (polygon) features. This operation is sometimes called a "Point in Polygon" overlay.

As the help explains, "each point receives the attributes of the area(s) it is contained in, and each containing area receives the attributes of each point it contains."

<figure><img src="/files/7dMgPZn8vgvngwJplm81" alt=""><figcaption></figcaption></figure>

Here the TransitStation features are being provided with a postal code (CFSAUID) depending on which PostcodeBoundary polygon they fall inside.

The "\_overlaps" attribute is another useful outcome of this transformer. It tells us how many polygons each station fell inside; in this case, overlapping postal codes might be spotted by a station having more than one overlap.

Conversely, the Area output would have an "\_overlaps" attribute that would tell us how many stations fell inside each postal code.

## NeighborFinder

The NeighborFinder transformer carries out a spatial join based on a proximity relationship. Here the NeighborFinder is being used to identify the closest fire hall to each transit station:

<figure><img src="/files/wvjO1ZJJwrNa1rG5svZ2" alt=""><figcaption></figcaption></figure>

The fire hall number, name, address, and phone number attributes are merged onto each Facility feature along with a number of useful attributes (not all shown) recording the X/Y coordinate, direction, and distance of the closest fire hall.

The parameters of the NeighborFinder includes the ability to specify a maximum distance for the relationship, or the maximum number of neighbours to find.

## FeatureReader

The FeatureReader is the spatial equivalent of the DatabaseJoiner transformer. It reads from an external dataset and forms a match based on a spatial relationship between the initiating feature and features in that dataset.

One difference is that the output is not the original feature, but the queried feature; hence the name FeatureReader:

<figure><img src="/files/QgUESK1OwUvXb7AwCe3F" alt=""><figcaption></figcaption></figure>

For example, here the FeatureReader is being used to carry out the same overlay of transit stations and postal codes. The PostcodeBoundaries features are read into the workspace and used as a means to spatially query TransitStations (a table in a Geodatabase). The stations are retrieved with the attributes of the postcode feature they fall inside.

This also acts as a form of filter, as stations are not outputted unless they fall inside the postcode boundary.

## SpatialFilter

The SpatialFilter - as its name suggests - filters data according to a spatial relationship. However, it does also merge attributes from one feature to another, therefore can be said to be a type of Spatial Join.

<figure><img src="/files/pmzMX5GdaDziben6LHl3" alt=""><figcaption></figcaption></figure>

The important part is to connect both Passed and Failed output ports unless you do want to also filter the data.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://1spatial.gitbook.io/fme-form-beginner/transformer-usage/data-joins/spatially-based-join-transformers.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.
