FME Transformers: 2024.2

Categories
Data Quality
Filters and Joins
Spatial Analysis
Related Transformers
AreaOnAreaOverlayer
Bufferer
Clipper
Intersector
LineOnAreaOverlayer
LineOnLineOverlayer
NeighborFinder
PointOnAreaOverlayer
PointOnLineOverlayer
PointOnPointOverlayer
SpatialFilter
TopologyBuilder

SpatialRelator

Determines what type of spatial (topological) relationships exist between sets of point, line, area, and text features. Tags - but does not alter the geometry of - features when selected relationships exist, and performs a spatial join to optionally copy attributes between features.

Jump to Configuration

Typical Uses

  • Identifying what kind of spatial relationship(s) exist between features
  • Performing a spatial join to transfer attributes from one feature to another based on their spatial relationship

How does it work?

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. Only the Requestor features are output from the transformer. Suppliers are used to perform the analysis, and then discarded.

The transformer can be configured to look for one or more specific types of spatial relationship, and to add attributes from the Suppliers to the Requestors. These attributes, as well as the details of the spatial relationships, are (by default) added to the Requestor features as list attributes.

Each input Supplier feature is compared against the Requestor features, based on the tests chosen in the Spatial Predicates to Test parameter. When one of the comparisons is true, an entry is added to the Requestor’s list attribute. The list attribute is only created for features that have a match. Each entry contains:

  • The DE9IM string representing the spatial relationship
  • The name of the type of spatial relationship
  • Attributes from the Supplier (all, some, or none, depending on your selection), performing a spatial join

Every Requestor feature, whether they match a supplier or not, receives a new attribute containing a count of the number of features they match.

Output for a feature that matches two Suppliers might look like this, using default attribute names and selecting a single Supplier attribute for inclusion:

The SpatialRelator does not alter geometry.

Examples

Usage Notes

  • See Spatial Relations Defined for more information on spatial predicates and an illustration of spatial relationships.
  • Spatial relations are based on the OGC specification and so are undefined for geometries that are not OGC valid.
  • Aggregates are accepted by a subset of predicates, but should be used with care. See Spatial Relations Defined for more information.

Choosing a Spatial Transformer

Many transformers can assess spatial relationships and perform spatial joins - analyzing topology, merging attributes, and sometimes modifying geometry. Generally, choosing the one that is most specific to the task you need to accomplish will provide the optimal performance results. If there is more than one way to do it (which is frequently the case), time spent on performance testing alternate methods may be worthwhile.

To correctly analyze spatial relationships, all features should be in the same coordinate system. The Reprojector may be useful for reprojecting features within the workspace.

Configuration

Input Ports

Output Ports

Parameters

Editing Transformer Parameters

Transformer parameters can be set by directly entering values, using expressions, or referencing other elements in the workspace such as attribute values or user parameters. Various editors and context menus are available to assist. To see what is available, click beside the applicable parameter.

For more information, see Transformer Parameter Menu Options.

Reference

Processing Behavior

Group-Based

Feature Holding

Yes

Dependencies  
Aliases  
History  

FME Community

The FME Community has a wealth of FME knowledge with over 20,000 active members worldwide. Get help with FME, share knowledge, and connect with users globally.

Search for all results about the SpatialRelator on the FME Community.

 

Examples may contain information licensed under the Open Government Licence – Vancouver, Open Government Licence - British Columbia, and/or Open Government Licence – Canada.