The FeatureReader Transformer

Liz Sanderson
Liz Sanderson
  • Updated

FME Version

  • FME 2017.x


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 initiator feature causes a single query to be carried out through the reader. The query can be an attribute query, 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.


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.



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 uses the FeatureReader to read and translate all feature classes from multiple geodatabases without knowing exactly which feature classes exist.

Was this article helpful?



Please sign in to leave a comment.