Getting Started with FME Form: Working with Spatial Data

Tandra Geraedts
Tandra Geraedts
  • Updated

Introduction 

In this article, you'll discover how to create a workspace in FME Workbench, the authoring application accompanying FME Form, specifically emphasizing the utilization of spatial (GIS) data. Follow along with the step-by-step instructions to learn how to read data from an OGC GeoPackage that includes points of trash containers and polygons of parks, add a transformer to filter for trash containers within the parks spatially, and then write the filtered data to an Esri Shapefile.

A rebranded interface was introduced in FME 2024.0. This tutorial can be used with any version of FME. The concepts are the same, but the screenshot appearances may differ.

In FME 2025.1, the toolbar menu has been organized. Readers and writers can now be found under the Build menu. Additionally, an Add button has been added to the canvas, where sources, destinations, and transformers can be selected.

Source Data

The source dataset is an OGC GeoPackage containing points for trash containers and park polygons.

InputData.png

Step-by-step Instructions

1. Start a Blank Workspace

Start FME Workbench, then click the New button.

The FME Workbench canvas is where the workspace will be built using readers, writers, and transformers.

2. Add an OGC GeoPackage Reader

First, we need to add a source dataset. A reader is an object in a workspace that reads a source dataset. There are a few ways to accomplish this. 

Click on the Reader button on the toolbar
On the top menu bar, click Build > Readers > Add Reader
In FME 2025.1+, you can click on the canvas to add a data source. 

In the Add Reader dialog, set the following fields: 

  • Format: OGC GeoPackage
  • Dataset: City.gpkg
    • Click the ellipsis next to Dataset to browse to the city.gpkg file on your computer

Click OK.

Since this dataset has multiple tables, a Select Feature Types (Table) window will open. Both tables should be selected by default; if not, select both. Click OK.

Readers create individual feature types for each table or dataset. Since we added two tables, two readers have been added to the canvas.

We can look at the Navigator pane to see all the readers that have been added.

a) This represents the dataset, such as the entire City.gpkg dataset.

b) The feature types represent each part of the dataset, in this case, the parks and trash_container layers.

3. Add a Transformer

Transformers are the building blocks of a workspace for manipulating data, and each has a specific function. You can add a transformer in multiple ways, similar to readers: 

Click anywhere on the blank canvas and start typing the transformer name to access the quick add menu  
Click on the Transformer button on the toolbar
On the top menu bar, click Build > Transformers > Add Transformer.
In FME 2025.1+, you can click on the green + on the canvas and select Transformer

We will filter the data using a SpatialFilter transformer to find where trash containers are within the parks. Type Spatial in the add transformer window. Double-click the SpatialFilter transformer to add it to your workspace.

The data and the transformer need to be connected to access the data from within the transformer. Click and drag from the arrow on the parks reader feature type to the red arrow of the SpatialFilter transformer. This connection line sends data from the feature type into the transformer for processing.

Next, connect the trash_container reader feature type to the Candidate input port on the SpatialFilter.

4. Review Transformer Parameters

The SpatialFilter uses spatial predicates as filters. The test we will need to perform is Filter OGC (trash_containers) - Intersects Candidate (parks). 

Double-click anywhere on the SpatialFilter to open the parameters. By default, the SpatialFilter is already set to Filter OGC - Intersects Candidate. Since we do not need to change the Spatial Predicate to Test parameter, we can click OK or Cancel to accept the default parameters.

For more information on the SpatialFilter parameters, please see our documentation.

5. Add a Writer

Now, the data needs to go to a destination. The data displayed in Visual Preview is currently stored only in FME Workbench, so we need to write it to a file for later use or for use in a different application. This is accomplished with a writer. 

Like readers and transformers, there are multiple ways to add a writer to the canvas.

Click on the Writer button on the toolbar
On the top menu bar, click Build > Writers > Add Writer
In FME 2025.1+, you can click on the green + on the canvas and select Destination

In the Add Writer dialog, set the following fields:

  • Format: Esri Shapefile
  • Dataset: <location on your computer>
    • Click on the ellipsis next to the Dataset field to select a location on your computer
  • Shapefile Definition: Copy from Reader…

Click OK

The Select Feature Type dialog will open. Since we selected Copy From Reader for the Shapefile Definition, we want to choose trash_container as the reader feature type to copy. 

Click OK. 

The schema from the trash_container reader feature type was copied, and the writer feature type will have the exact attributes and point geometry as the input.

The writer feature type needs to be connected to the workflow. Click and drag from the SpatialFilter Passed output port arrow to the red arrow on the trash_container writer feature type.

ConnectToWriterOGC.png

6. Run the Workspace

The workspace will read the data, filter for trash_containers intersecting parks, and then write the filtered trash_containers to an Esri Shapefile. Running the workspace with a writer connected will write the data out to disk. On the top toolbar (ribbon), click the green Run button. 

Clicking Run will trigger the workspace to read the data, process it through any transformers, and then write it out.

After clicking Run, a Translation Parameter Value dialog will pop up; this is where any user-defined parameters can be modified. We do not need to make any changes now; click Run to continue. 

After the workspace is initiated, data will flow through it. The numbers on the connection lines represent the number of features it is transporting, and the numbers on each output port represent the number of features it outputs. A feature in FME is a single row in a table or a single piece of geometry with associated attributes.  

7. View Output

After running the workspace, if feature caching is enabled, green eye icons appear on any output ports with features. These icons represent cached data and can be used to view data at any part of the workspace. To learn more about feature caching or other methods of viewing data, see Data Inspection in FME.

Since our data was written to disk, we need to view the final output. To do so, single-click on the trash_container writer feature type to open the mini toolbar. Then, click the View Written Data button to open the data in Data Preview.

Data Preview is the viewer within FME Workbench. In the Data Preview window, you will see only the trash containers that intersect parks.

This screenshot contains a background map and the park polygons. The documentation provides more information on viewing data and background maps.

OutputData.png

Additional Resources

Continue Your FME Journey  

Want to learn about a specific format?

Want to continue learning FME Form basics?

  • The FME Academy is a guided, on-demand way to learn the entire FME Platform, and it's FREE! 

Interested in self-serve and automation?

Have a specific question?

Data Attribution 

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

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.