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

Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.

Defining Values

There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters. There are a number of tools and shortcuts that can assist in constructing values, generally available from the drop-down context menu adjacent to the value field.

Dialog Options - Tables

Transformers with table-style parameters have additional tools for populating and manipulating values.

Reference

Processing Behavior

Group-Based

Feature Holding

Yes

Dependencies  
Aliases  
History  

FME Community

The FME Community is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.

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

 

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