Generic (Any Format) Reader Parameters
The Generic reader acts as a wrapper for the true reader which will be used when the translation is done. At run-time, once the actual reader is known, the Generic reader will do its best to represent the intention of the translation in the chosen input format.
The reader takes a file or multiple files, folder, URL, or database name as the input dataset. If the format that is ultimately targeted requires an input folder, the Generic reader will turn the input filename into a folder by removing the file name part of the path.
Adding an additional reader or a schema reader to a workspace
It is sometimes useful to pre-configure parameters that are specific to individual input formats. For example, to read from a database, a collection of connection parameters must be specified.
You can add an additional reader or a schema reader to the workspace. The first reader in the multi-reader will be the Generic one, and this one will contain all the input feature types. The second reader may or may not have feature types, but will be used to communicate any format-specific reader settings to the Generic reader, when that format is used as the format for the Generic reader.
For example, if the Input Format here is set to Microsoft SQL Server, the settings specified for the Microsoft SQL Server reader will be transferred to the Microsoft SQL Server reader that the Generic reader will use.
Input
Select the name of the format that will be used at run-time.
If no valid format is specified, the reader will try to guess the name from the filename extension of the source dataset (if the dataset is a file).
Schema Attributes
Use this parameter to expose Format Attributes in FME Workbench when you create a workspace:
- In a dynamic scenario, it means these attributes can be passed to the output dataset at runtime.
- In a non-dynamic scenario, this parameter allows you to expose additional attributes on multiple feature types. Click the browse button to view the available format attributes (which are different for each format) for the reader.
Spatial
Coordinate systems may be extracted from input feature data sources, may come predefined with FME, or may be user-defined. FME allows different output and input coordinate systems, and performs the required coordinate conversions when necessary.
If a coordinate system is specified in both the source format and the workspace, the coordinate system in the workspace is used. The coordinate system specified in the source format is not used, and a warning is logged. If a source coordinate system is not specified in the workspace and the format or system does not store coordinate system information, then the coordinate system is not set for the features that are read.
If a destination coordinate system is set and the feature has been tagged with a coordinate system, then a coordinate system conversion is performed to put the feature into the destination system. This happens right before the feature enters into the writer.
If the destination coordinate system was not set, then the features are written out in their original coordinate system.
If a destination coordinate system is set, but the source coordinate system was not specified in the workspace or stored in the source format, then no conversion is performed. The features are simply tagged with the output system name before being written to the output dataset.
For systems that know their coordinate system, the Coordinate System field will display Read from Source and FME will read the coordinate system from the source dataset. For most other input sources, the field will display Unknown (which simply means that FME will use default values). In most cases, the default value is all you'll need to perform the translation.
You can always choose to override the defaults and choose a new coordinate system. Select More Coordinate Systems from the drop-down menu to open the Coordinate System Gallery.
Changing a Reprojection
To perform a reprojection, FME typically uses the CS-MAP reprojection engine, which includes definitions for thousands of coordinate systems, with a large variety of projections, datums, ellipsoids, and units. However, GIS applications have slightly different algorithms for reprojecting data between different coordinate systems. To ensure that the data FME writes matches exactly to your existing data, you can use the reprojection engine from a different application.
To change the reprojection engine, Select Workspace Parameters > Spatial > Reprojection Engine. In the example shown, you can select Esri (but the selection here depends on your installed applications):
- The coordinate systems file coordsys.db in the FME installation folder contains the names and descriptions of all predefined coordinate systems.
- Some users may wish to use coordinate systems that do not ship with FME, and in those cases, FME also supports custom coordinate systems.
- Learn more about Working with Coordinate Systems in FME.