Merging or Joining Spatial Data

Liz Sanderson
Liz Sanderson
  • Updated

Introduction

Merging or joining data that has geometry can be accomplished in FME by using a transformer. Data that has geometry needs to be handled differently than when working with spreadsheet or database data. If you are merging spreadsheet or database data, see the Merging or Joining Spreadsheet or Database Data article. 
​​​​​​​

Geometry in FME is grouped into three different categories:

  • Points (includes text)

  • Curves (includes lines, arcs, and paths)

  • Areas (includes polygons, donuts, and ellipses)

Depending on the geometry you are trying to merge or join a different transformer is required.

 

Transformers

There are four main categories of spatial merging and joining transformers in FME:

  1. Proximity Join: joins based on how far one feature is from another

  2. Modifying Geometry Join: joins that will cause geometry to be changed (like a cookie cutter)

  3. Geometry Relationship Join: joins based on the relationship between the geometry (is the feature inside, outside, or touching the other feature).

  4. External Join: joins data already inside the workspace to external data.

All of these transformers will join attributes of the features, but not always by default. To ensure that the attributes are also merged, enable the “Merge Attributes” parameter, if applicable.


When trying to decide which transformer is the correct one to use, follow the flowchart below to help. Please inspect your data and ask the following questions:

1) Is all of my data already inside the workspace?

  • If yes: Continue to question 2

  • If no: Either use the FeatureReader for your join or read in the data and continue to question 2

2) Do I want to alter the geometry of my data?

  • If yes: Use a transformer from the Modifying Geometry column (continue to question 3)

  • If no: Use either a Proximity or Geometry Relationship join (skip to question 4)

3) You want to alter the geometry. Do you want to clip the data to the size of the other data (cookie cutter?)

  • If yes: Use the Clipper transformer

  • If no: Use one of the overlayer transformers in this column (skip to question 5)

4) You DO NOT want to alter the geometry. Do you want to join based on a relationship (touching, completely inside, intersects, etc)?

  • If yes: Use one of the Geometry Relationship transformers (continue to question 5)

  • If no: Use one of the Proximity transformers (continue to question 5)

5) Did any of those transformers work?

  • If yes: Great!

  • If no: Read the documentation carefully to ensure it was set up correctly and suites your needs

  • If unsure: Ask a question on our community.

Download a PDF version from the 'Files' section. 

 

Tutorials and Documentation

Transformers listed by category

 

Proximity

PointOnPointOverlayer

The PointOnAreaOverlayer compares points and polygons. 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.

PointOnPointOverlayer Documentation

 

NeighborFinder

The NeighborFinder is a spatial transformer that finds the nearest candidate feature(s) to each base feature and then merges the attributes onto the base feature.

Passing attributes between features in close proximity using NeighborFinder

Determining Nearest Neighbors

NeighborFinder Documentation

 

Matcher

The Matcher can receive any number of input feature streams. All features are compared against all other features, and matches are identified based on the parameters defined.

Data QA: Identifying Duplicate Features with FME

Calculate Strahler Stream Order Numbers

Matcher Documentation

 

Modifying Geometry: Clipping Splitting

PointOnLineOverlayer

The PointOnLineOverlayer compares points and lines, splitting the lines where a point falls on (or within a specified distance of) the lines.

PointOnLineOverlayer Documentation

 

Clipper

The Clipper transformer is a spatial transformer that performs a geometric clipping operation (sometimes called a cookie cutter). While clipping, object attributes can be spatially joined.

Example Using the Clipper Transformer

Generating Polygon Differences with the Clipper Transformer

Raster Clipping

Clipper Documentation

 

LineOnLineOverlayer

The LineOnLineOverlayer takes in line features and compares them to each other.

LineOnLineOverlayer Documentation

 

LineOnAreaOverlayer

The LineOnAreaOverlayer compares lines and polygons, splitting the lines where they intersect with a polygon boundary.

LineOnAreaOverlayer Documentation

 

AreaOnAreaOverlayer

The AreaOnAreaOverlayer takes in area features. All polygons are considered against each other, and where they overlap, new polygons are created that represent both the overlapping area and the original areas with the overlap removed.

Extracting Polygon Intersections with the AreaOnAreaOverlayer

AreaOnAreaOverlayer Documentation

 

Fine Tuning Geometry Relationships

PointOnAreaOverlayer

The PointOnAreaOverlayer compares points and polygons. 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.

Point in Polygon Calculations with the PointOnAreaOverlayer

PointOnAreaOverlayer Documentation

 

SpatialRelator

The SpatialRelator takes in two streams of features - Requestors and Suppliers. The Requestors are the features you would like to identify information about, determining what spatial relationship(s) they have with the Supplier features.

SpatialRelator Documentation

 

SpatialFilter

The SpatialFilter is a spatial transformer that filters point, line, area and text features based on spatial relationships. The attributes can then be merged based on the filter.

Determining Spatial Relationships

Buffering features for Spatial Relationship Analysis

SpatialFilter Documentation

 

External Data

FeatureReader

The FeatureReader reads features from any FME-supported format. This can be done midstream which aids in adding and joining data quickly.

The FeatureReader Transformer

Performing spatial queries on database tables using the FeatureReader

FeatureReader Documentation

 

Looking for spreadsheet or database transformers? See the Merging or Joining Spreadsheet or Database Data article.

 

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.