Raster Neighborhood Functions | Using the RasterConvolver

Liz Sanderson
Liz Sanderson
  • Updated

Introduction

The RasterConvolver is a transformer that applies a convolution filter to raster data. Convolution filters are applied using a kernel, specified as a matrix of weights for neighboring values. Filtering can be used to smooth, sharpen, and enhance edges, as well as for other raster image manipulation operations.

Data Source

The source dataset is an orthophoto of the City of Vancouver, stored as a GeoTIFF. 

input.png

Additional files are available on the right-hand side of this article.

Step-by-step Instructions

In this scenario, you are interested in applying a convolution filter in order to sharpen a GeoTIFF image. For more information on Raster processing using the RasterConvolver, check out the Edge Detection with the RasterConvolver article or the Raster Slope Calculations as a RasterConvolver Example article.

1. Create a New Workspace

Open FME Workbench and create a blank workspace. 

NewWorkspace.png

2. Add a GeoTIFF Reader

Add a reader to the canvas by clicking on the Reader button on the top menu bar or by going to Readers > Add Reader. In the Add Reader dialog, set the following:

  • Format: GeoTIFF
  • Dataset: BCVANC15_O7.tif
    • Click on the ellipses to navigate to the location of the file on your computer

Click OK to add the reader to the canvas.

Reader.png

3. Add a RasterConvolver

Click on the GEOTIFF reader feature type to select it.  Then add a RasterConvolver transformer to the canvas by typing “RasterConvolver” to bring up the list of FME Transformers in the Quick Add Search. Select the RasterConvolver from the list of Transformers by double-clicking or by using the arrow keys and the Enter key to add it. 

QuickAdd.png

Connection.png

Double-click on the RasterConvolver to open the parameters. In the parameters, set the following:

  • Filter:
    • Convolution Filter: Sharpen 3
  • Preserve Band Interpretation: Yes

Click OK

 RasterConvolutor.png

By default, the preserve band interpretation is set to No; leaving it at No would convert the Red, Green, and Blue bands of the GeoTIFF to Real64 (i.e., convert to a grayscale image).

4. Run Workspace

Connect an Inspector transformer to the Output port on the RasterConvolutor. 

 Workspace.png

Run the workspace by clicking the Run button on the top toolbar, or by selecting Run > Run Workspace from the top menu bar. 

Run.png

After running the workspace, the output will be sharpened. Try picking another filter from the RasterConvolver’s predefined convolution filters or enter your own values by setting the Convolution Filter to User Defined and entering Kernel Weights.

ouput.png

Data Attribution

The data used here originates from open data made available by the City of Vancouver, British Columbia. It contains information licensed under the Open Government License - Vancouver.

Was this article helpful?

We're sorry to hear that.

Please tell us why.

As of January 14th, 2026, comments on knowledge base articles have been closed. To make sure questions don’t get missed and to enable more community support, we’ve moved discussions to the FME Community. If you have a question or a comment about this article, please create a new post or create a support ticket.