FME Transformers: 2024.2

Categories
Spatial Analysis
Related Transformers
AreaOnAreaOverlayer
Bufferer
Intersector
LineOnAreaOverlayer
LineOnLineOverlayer
NeighborFinder
PointOnAreaOverlayer
PointOnLineOverlayer
PointOnPointOverlayer
SpatialFilter
SpatialRelator
TopologyBuilder

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

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 Clipper 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.