Example Using the Clipper Transformer

Liz Sanderson
Liz Sanderson
  • Updated

FME Version

  • FME 2022.0


The Clipper performs a geometric clipping operation (sometimes called a cookie-cutter). Most geometry types can be clipped by an area, and some may also be clipped by a solid. The following examples demonstrate the Multiple Clippers, Clippers Arrive First, and Overlapping Clipper parameters. See the Additional Resources at the end of the article for more Clipper tutorials. 

The Clipper takes a number of clip boundaries (Clipper input port) and a number of features to be clipped (Candidate [2022.0+] / Clippee input port). Then the output is split into four output types (previously three output types in FME 2021.2 or prior):

  • Inside: All Candidate/Clippee features that are entirely inside a Clipper feature
  • Outside: All Candidate/Clippee features that are entirely outside all Clipper features
  • Remnants: New for 2022.0, outputs features that are zero-width or nearly zero-width, that have no area, such as a zero-width spike.   
  • <Rejected>: Controlled by the “Invalid Parts Handling” parameter. This parameter controls the behavior of rejected features such as aggregate and multi geometries that contain features that are invalid for clipping (such as null geometries). These geometries without a spatial location can neither be classified as inside nor outside. Use this parameter to decide if you only want to reject the invalid parts or reject the entire feature.  


There are a lot of parameters in the Clipper, but only a few are commonly used. The following examples will demonstrate these commonly used parameters. For more details on these and other parameters, please see the Clipper documentation. [Clipper 2022.0+ | Clipper 2021.2 or older ] 


Multiple Clippers/Clippers Arrive First

Download ClippersFirst.fmwt for a sample workspace. 
When running a workspace, if you can guarantee that the data going into the Clipper input port on the Clipper transformer arrives first, you will see huge performance gains. This is especially true for FME 2022.

To ensure that your data arrives first, the order the data arrives at the Clipper input port can be controlled. Firstly, you can modify the order in which the data is read; this can be done by reordering the readers in the Navigator pane or by controlling Run-Time Order for transformers with no input port, such as a Creator or SQLCreator, or any custom transformer. Secondly, you can also control the Run-Time Order when a transformer has multiple outputs coming from the same output port. 

Once you have confirmed that the data will be arriving with the clippers first to the Clipper transformer, this parameter needs to be enabled. In the Clipper parameters, set Clippers Arrive First to Yes. Additionally, if you have multiple Clippers coming into the Clipper, the parameter Multiple Clippers needs to be set to Yes. 

If either of these parameters is used and the assumption is not true, Clipper features will be rejected with the rejection code ‘EXTRA_CLIPPER_FEATURE’.

In the example workspace, the Cloner is used to create over a million cell signal points, to be clipped against the neighborhoods in Vancouver. With Clippers First set to No, the workspace takes over 5+ minutes to run. With Clippers First set to Yes (Advanced), the workspace takes only 3 minutes. Run the workspace for yourself to see the performance differences (actual times may vary due to computer hardware limitations). 


Overlapping Clippers

Download OverlappingClippers.fmwt for a sample workspace. 
When using multiple clippers, there are three different options to tell FME how to clip the Candidate when the Clippers overlap. 

By default, the Clipper is set to Clip Only Outside Remainders, which the first clipper to arrive will clip its portion; then the second clipper will clip the remainder. 

The other two options, Clip Original Candidates and Clip Interm Results, will clip the candidate, then clip the original again, as well as output the overlap when Interm Results is set. 

In the example workspace, there are two types of promotions a company is planning to send out, a flyer with a coupon and a flyer without a coupon. They have two different boundaries for these promotions based on previous campaigns. Using the Overlapping Clippers parameter, let’s determine which method would be the best. In addition, we will Generate a List From Overlapping Clippers, with the Clipper List Name set to Strategies. 

Clipping Only Outside Remainders

The Clipping Only Outside Remainders option clips the flyer with the coupon first; then the remainders were clipped. Where the clippers overlapped, the customer will only get the flyer with the coupon. 

Clip Original Candidates 

For the Clip Original Candidates option, the overlapping area is clipped twice. This means the customer would get the same flyer with a coupon twice. 

Clip Interim Results

For the Clip Interim Results option, the overlapping section contains the flyers for both promotions, which we can see because the list was enabled. This means the customer would get both the flyers. 

The best clipping option, so that all the customers only get a single flyer, would be to Clip Only Outside Remainders. If we had different promotion options, such as an email and newspaper, Clip Interim Results would be a good option. 

Additional Resources

Clipper documentation
Clip, Clip, Hooray! Get Just the Data You Need with Clipping webinar
Generating Polygon Differences with the Clipper Transformer
​​​​​​​How to Dissolve Geometry Solids
​​​​​​​How to Clip TIN Surfaces
​​​​​​​Select Data by Area Masks
​​​​​​​Raster Clipping

Was this article helpful?



Please sign in to leave a comment.