Clipper

Divides Candidate features using Clipper features, so that Candidates and parts of Candidates that are inside or outside of the Clipper features are output separately. Attributes may be shared between objects (spatial join).

Jump to Configuration

Typical Uses

  • Identifying where points, lines, or areas fall inside, outside, and intersect with one or more reference areas (Clippers), and modifying their geometry and attributes accordingly.
  • Clipping features to perform calculations by Clipper area
  • Clipping rasters or point clouds to a regular or irregular area of interest
  • Clipping features to a map boundary for aesthetics

How does it work?

The Clipper takes in two sets of features:

  • Clippers: Areas or solids which will be overlaid on Candidate features to identify which of those features fall inside or outside the Clippers. Those features are split where they cross the boundaries of the Clippers.
    The geometry of the Clippers is unchanged, and they are discarded after use and not output from the Clipper transformer.
  • Candidates: Features with any type of geometry, which are compared to the Clippers, and split into multiple sections along the Clipper boundaries if necessary. Each section is output as either falling Inside or Outside the Clipper. They may also receive attributes from the Clippers (spatial join).
    Candidate geometry is only altered if it intersects with a Clipper. If it falls wholly inside or outside the Clipper, it is designated as such and output with its geometry untouched.

Output features receive a Clipped Indicator attribute (default name _clipped), which is set to “yes” for features that have been segmented, identifying features that were wholly inside or outside the clip boundaries and those that intersected the Clipper boundaries and so were modified.

The Clipper works on all geometry types. This diagram illustrates area-on-line and area-on-area vector clipping results.

  • (1) is a single area Clipper (in blue).
  • (2) are the Candidates, a red line that crosses the Clipper (1), and red area that partially overlays the Clipper (1).

Both the line and area Candidates are split where they cross the Clipper boundary, and the results are output:

  • (3) Portions of Candidates that fall Inside the Clipper (red only)
  • (4) Portions of Candidates that fall Outside the Clipper (red only)

Raster Clipping, Alpha and Nodata

Raster cells are considered inside or outside the clipper based on either their centers or their boundaries, according to the Determine Cell Location By parameter.

If Raster Candidates > Add Alpha/Nodata is set to Yes, cells that fall outside the clip area but within the resulting bounding box will be assigned values as follows:

  • Bands with a Nodata value assigned: Nodata value

  • Bands without a Nodata value assigned:

    • RGB : Alpha band is added, all bands set to 0, resulting in transparent cells.

    • Bands with palettes: Nodata value is added, set to Nodata value.

    • Bands without palettes: Set to 0.

To set an explicit value for Nodata, use the RasterBandNodataSetter transformer prior to the Clipper.

This transformer is unaffected by raster band and palette selection.

Examples

Usage Notes

  • Memory requirements: Clipping rasters can fail if not enough memory is available, which is more likely to happen the larger the raster is. If this occurs, increasing available memory or reducing raster resolution may help.

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 Clipper on the FME Community.

 

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