The FeatureReader Transformer

Liz Sanderson
Liz Sanderson
  • Updated

Introduction

The FeatureReader transformer is one that acts – as the name suggests – as a reader in itself. Each incoming feature triggers a query to a database (or, in fact, any dataset) that can include both spatial and non-spatial data. This way, queries can be carried out mid-translation, rather than through Reader parameters.

Incoming features are known as Initiators. Each of the initiator features causes a single query to be carried out through the reader. The query can be an attribute query, a spatial query, or a combination of the two.

For a spatial query, the geometry of the initiator feature is used, with different spatial predicates, and the reader returns one or more features as the result of the query. For example, an area bounding polygon (i.e., municipal boundary) could be used to extract all postal addresses inside that area. Or an incoming line feature (maybe a road) can be used to define the base for an intersection query against linear database features such as rivers or rail.

featurereader1.jpg

In addition, the FeatureReader can be used for non-spatial queries. The Initiator feature may have an attribute to be used in a WHERE clause against the data to be read. In this case, ensure that the attribute is indexed, as this has a major impact on the performance of the FeatureReader.

FeatureReader has options on how attributes from the Initiator features are merged onto the result features. The FeatureReader can have multiple output ports, which all return different features depending on how the transformer has been configured. The full details on all the functionality offered by the FeatureReader is in the Documentation.

Below are some example workspaces showing the kinds of tasks that can be performed by the FeatureReader transformer.

Articles

Performing Spatial Queries Against Database Tables Using FeatureReader

The SQLExecutor can also be used to perform this; however, the FeatureReader requires no knowledge of SQL.

Extracting Data with a Clipping Polygon Using FeatureReader

A simple example of how to set up a workflow to extract data in user-specified layers that fall within a given polygon.

How to Read Multiple Feature Classes from Multiple Geodatabases

This example utilizes the FeatureReader to read and translate all feature classes from multiple geodatabases, regardless of the specific feature classes present.

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.