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. 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, which will be overlaid on other features to identify which of those features fall inside or outside the Clippers, and split those features 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.
  • Clippees, 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).
    Clippee 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 new Clipped Indicator Attribute (default name _clipped), which is set to “yes” for features that have been segmented, enabling differentiation between features that were wholly inside or outside the clip boundaries and those that intersected the Clipper feature(s) and so were modified.

The Clipper works on many 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 Clippees, a red line that crosses the Clipper (1), and red area that partially overlays the Clipper (1).

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

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

What can I clip?

As the Clipper collects multiple clipping methodologies into one convenient transformer, it is important to understand which type of clipping you wish to perform, and which types of geometry can be compared in a clipping operation.

Most types can be clipped by an area or multi-area. Some types can also be clipped by a solid or multi-solid.

If the clipping operation you need is not listed here, consider one of the Overlayers or the Intersector- see Choosing a Spatial Transformer below.

Examples

Usage Notes

  • Because a raster feature must always be rectangular, clipped raster cells (that is, those outside the clipper but part of an Inside raster) will be set to the Nodata value. If a Nodata value has not been set, clipped raster cells will be set to 0. To set a value for Nodata, use the RasterBandNodataSetter transformer prior to the Clipper.
  • This transformer is unaffected by raster band and palette selection.
  • A feature can be clipped multiple times, but not iteratively (for example, if a line passes through two overlapping polygons, you don’t get a separate clipped line for the overlap - just one per polygon).

    For maximum intersectionality, consider the Intersector.

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.