AttributeReprojector
Reprojects coordinates stored as attributes from one coordinate system to another.
Typical Uses
- Reprojecting coordinates stored as attributes (not geometry) to the desired coordinate system
- Adding additional coordinate pairs as attributes, in alternate coordinate systems
How does it work?
The AttributeReprojector accepts any feature. The user specifies the attributes containing x and y coordinates, and supplies both the source and destination coordinate systems.
The transformer reprojects the coordinates according to these selections, and updates the x and y attributes to the new values, overwriting the originals.
This transformer does not alter the feature’s geometry – only the values of the selected X and Y attributes (if they contain coordinate values) are changed.
Accurate results depend on the user’s correct selection of the source coordinate system.
In this example, we start with a CSV file of drinking fountain locations. A CSV dataset has no geometry, but it does contain coordinates for the fountains, in a UTM projection.
The CSV features are routed into an AttributeReprojector.
In the parameters dialog, the x and y attributes containing the coordinates are specified accordingly, the source coordinate system entered (as UTM83-10), and the new destination coordinate system chosen (LL-WGS84).
The new coordinates are calculated and replace the existing attribute values. The transformer does not create geometry, it only supplies values.
In this example, we start with a CSV file of drinking fountain locations, which has no geometry. It contains coordinates for the fountains, in a UTM projection. We want to add an additional coordinate system’s coordinates to it, to provide options for users who may not have access to software that will reproject it for them.
The CSV features are routed into an AttributeManager, and then to the AttributeReprojector.
In the AttributeManager, we add two new attributes, named x_LLWGS84 and y_LLWGS84. Using the Attribute Value column, we copy the current x and y coordinates (still in UTM) from the x_coord and y_coord attributes.
In the AttributeReprojector parameters dialog, the x and y attributes are set to the new (copied) attributes, and the Source and Destination coordinate systems chosen.
The output now contains both sets of coordinates - the original UTM and new LL-WGS84.
Configuration
Input Ports
The features that contain the attributes you want to reproject.
Output Ports
All processed features are output through this port.
Parameters
X Attribute | Choose which X attribute to reproject. |
Y Attribute | Choose which Y attribute to reproject. |
Source Coordinate System | Choose from recently accessed coordinate systems, or click the browse button to access the Coordinate System Gallery. |
Destination Coordinate System | Choose from recently accessed coordinate systems, or click the browse button to access the Coordinate System Gallery. |
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.
Defining Values
There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters. There are a number of tools and shortcuts that can assist in constructing values, generally available from the drop-down context menu adjacent to the value field.
Using the Text Editor
The Text Editor provides a convenient way to construct text strings (including regular expressions) from various data sources, such as attributes, parameters, and constants, where the result is used directly inside a parameter.
Using the Arithmetic Editor
The Arithmetic Editor provides a convenient way to construct math expressions from various data sources, such as attributes, parameters, and feature functions, where the result is used directly inside a parameter.
Conditional Values
Set values depending on one or more test conditions that either pass or fail.
Parameter Condition Definition Dialog
Content
Expressions and strings can include a number of functions, characters, parameters, and more - whether entered directly in a parameter or constructed using one of the editors.
These functions manipulate and format strings. | |
A set of control characters is available in the Text Editor. | |
Math functions are available in both editors. | |
These operators are available in the Arithmetic Editor. | |
These return primarily feature-specific values. | |
FME and workspace-specific parameters may be used. | |
Working with User Parameters | Create your own editable parameters. |
Reference
Attribute Reprojections
Geometry Reprojections
Processing Behavior |
|
Feature Holding |
No |
Dependencies | |
FME Licensing Level | FME Base Edition and above |
Aliases | |
History | |
Categories |
FME Community
The FME Community is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.
Search for all results about the AttributeReprojector on the FME Community.
Examples may contain information licensed under the Open Government Licence – Vancouver