FME Transformers: 2024.1
FME Transformers: 2024.1
GtransAttributeReprojector
Reprojects coordinates stored as attributes from one coordinate system to another using the Gtrans reprojection engine from the National Land Survey of Sweden (Lantmäteriet).
Typical Uses
- Reprojecting features when explicitly using the Gtrans library is desired
- Adding additional coordinate pairs as attributes, in alternate coordinate systems
How does it work?
The GtransAttributeReprojector accepts any feature. The user specifies the attributes containing X and Y Coordinates, and selects a Transformation File to reproject them from one coordinate system to another, using the Gtrans engine.
Gtrans is widely used for coordinate transformation within Sweden as it is officially recommended, translates between numerous local coordinate systems, and supports rubbersheeting transformations.
The transformation is configured by selecting a Gtrans Translation File appropriate for the Source and Destination Coordinate System.
Translation Files
A selection of Gtrans Translation Files are provided with FME.
Only reprojections defined here or with a user-provided Gtrans Translation File (see below) may be performed with this transformer.
File Type |
Description |
Location |
---|---|---|
*.tf, *.tfi |
Translation File - a text file containing parameters defining a reprojection from one coordinate system to another.
|
[FME Install Directory]\Reproject\Gtrans\Sys |
*.tr1, *.tr2 |
Triangulation File - a binary file used for the interpolation of residuals.
|
[FME Install Directory]\Reproject\Gtrans\Sys |
Each *.tf/*.tfi file corresponds to a line item in the Gtrans Translation Files library accessed in the parameters dialog.
Note that when using the Filter option, FME searches the file names of the *.tf/*.tfi files - not the Source and Destination Coordinate Systems.
Geoid Files
When reprojecting between geoids, this transformer needs additional resource files.
File |
Description |
Location |
---|---|---|
geoid.def |
Geoid Definition File - a text file containing parameters describing geoids. A default version is provided with FME. User-provided geoids may also be used - see below. |
[FME Install Directory]\Reproject\Gtrans\Sys |
*.grd |
Binary Grid files for specific geoids. |
[FME Install Directory]\Reproject\Gtrans\Sys |
Gtrans User Data
Users may provide their own transformations and definitions by placing the appropriate files as directed:
File(s) |
Description |
Location |
---|---|---|
*.tf, *.tfi |
Translation File - a text file containing parameters defining a reprojection from one coordinate system to another.
The Translation File should reference the correct geoid.def and any required *.bin files. User-defined translations are placed in the same location as the provided Translation Files. |
[FME Install Directory]\Reproject\Gtrans\Sys |
geoid.def |
Geoid Definition File - a text file containing parameters describing geoids. A default version is provided with FME. The user version of this file is placed in a different location than the default geoid.def provided with FME. |
[FME Install Directory]\Reproject\Gtrans\Arkiv |
*.bin |
Binary Grid files for specific geoids. |
[FME Install Directory]\Reproject\Gtrans\Arkiv |
Examples
Example: Reprojecting attributes with Gtrans
In this example, we have a shapefile of point of interest (POIs) in Sweden, extracted from OpenStreetMap. Note that its Coordinate System is lat/long, WGS84.
We want to do two things - first, extract the center coordinates of each feature into attributes, and then reproject those attributes into an appropriate national coordinate system using the Gtrans engine.
The features are routed into a CenterPointExtractor, and then into a GtransAttributeReprojector.
In the parameters dialog of the CenterPointExtractor, we assign names to the new attributes which will contain the point coordinates.
As the features exit the CenterPointExtractor, they have two new attributes containing their extracted coordinates.
In the parameters dialog of the GtransAttributeReprojector, the X and Y Attributes are set to the values of the newly added coordinate attributes.
A Translation File is also selected.
The Translation File was selected from the Gtrans Translation Files gallery, via the ellipsis button. Note that the chosen Source Coordinate System is SWEREF 99 lat long, an equivalent to LL-WGS84
The output features have not been reprojected - but the coordinates stored as attributes have been.
View a sample Translation File
Copy
TFFIL Lantmäteriet 2006-08-24
Överräkning mellan SYSTEM:
SWEREF 99 13 30 Ellh-> SWEREF 99 lat long ellh
/
FSYSTEM SWEREF 99 13 30 Ellh/
HTYP ELLIPSOID METER/
TSYSTEM SWEREF 99 lat long ellh/
LATLONG DEG/
HTYP ELLIPSOID METER/
ELLIPSOID GRS 80/
PROJ GAUSS
G 13 30 0 DEG
0
150000
1
/
STOP /
View a sample Geoid Definition File
Copy
GEOID SWEN08_RH2000 grid
Geoidhöjdsmodell för SWEREF 99,
bilinjär interpolation i grid SWEN08_RH2000.grd, geografiska lat long
Gridstorlek: 801x376
lat-min: 54° long-min: 10°
lat-max: 70° long-max: 25°
dlat: 0°.02 dlong: 0°.04
/
ELLIPSOID GRS 1980
/
GRIDSYSTEM SWEREF 99 lat long
/
HSYSTEM RH 2000
/
GRIDFIL SWEN08_RH2000.grd
/
GEOID SWEN08_RH70 grid
Geoidhöjdsmodell för SWEREF 99,
bilinjär interpolation i grid SWEN08_RH70.grd, geografiska lat long
Gridstorlek: 801x376
lat-min: 54° long-min: 10°
lat-max: 70° long-max: 25°
dlat: 0°.02 dlong: 0°.04
/
ELLIPSOID GRS 1980
/
GRIDSYSTEM SWEREF 99 lat long
/
HSYSTEM RH 70
/
GRIDFIL SWEN08_RH70.GRD
/
Usage Notes
- This transformer does not change the feature's coordinates – it only changes the values of the selected X and Y attributes (if they contain coordinate values).
- FME has a Workspace Parameter, Reprojection Engine, that may be set to either FME (CS-Map) or Esri. This transformer will override this parameter setting.
- The AttributeReprojector provides similar functionality, and will use the default library (CS-Map or Esri) set in FME. It supports some Swedish coordinate systems, but will not use the Gtrans definitions or reprojection engine.
- To reproject coordinates stored as geometry, consider using the GtransReprojector.
Working With Coordinate System Transformers
FME inherently supports coordinate system transformations and reprojections.
Coordinate System Support and Reprojection
Coordinate systems generally have a name and a definition, and the syntax of that definition can vary greatly between both spatial data formats and other coordinate system libraries. Custom and local coordinate systems can also be defined in FME, further complicating matters. For in-depth information, see the Working With Coordinate Systems documentation.
Reprojections are generally done with the FME Reprojection Engine, which is based on the CS-Map coordinate system library. This default can be overridden on a per-workspace basis, using the Workspace Parameters > Translation > Reprojection Engine parameter, and set to Esri. Where appropriate, FME will use the Esri Reprojection Engine if it is selected there, with or without an Esri product being installed.
Coordinate System Support
These transformers perform various coordinate system-related tasks, but do not reproject the data.
Looks up coordinate system names and definitions between FME’s internal format and common third-party and open source representations, storing the results as an attribute. |
|
Retrieves the name of the feature's assigned FME coordinate system into an attribute. |
|
Removes the coordinate system from features, without modifying geometry or coordinates. |
|
Assigns a specified coordinate system to features, without modifying geometry or coordinates. |
|
Assigns a specified local coordinate system to features, without modifying geometry or coordinates. |
Coordinate System Reprojection
Different coordinate system libraries (engines) not only contain coordinate system definitions, they also have unique reprojection algorithms. FME’s generic reprojection transformers, in the first table below, default to using the FME (CS-Map) library.
A selection of other libraries is also available, some of which are specific to certain areas of the world or software platforms.
Inherent reprojections, as in a workspace with different input and output coordinate systems selected, default to using the FME (CS-Map) library.
If you are reprojecting explicitly with a transformer in the workspace, using library-specific transformers is recommended. In the case of CsmapReprojector versus the Reprojector (with default engine), the library may be identical, but the CSMapReprojector handles vertical coordinate calculations whereas the Reprojector does not.
Generic Reprojection Transformers
|
|
Library |
---|---|---|
Reprojects x and y coordinates stored as attributes from one coordinate system to another. |
FME (default) or Esri |
|
Reprojects one or more features to a local coordinate system centered on the bounding box containing all features. |
FME (default) or Esri |
|
Converts a given angle from one coordinate system to another. |
FME (default) or Esri |
|
Converts a given length from one coordinate system to another. |
FME (default) or Esri |
|
Reprojects feature x and y coordinates from one coordinate system to another. |
FME (default) or Esri |
Library-Specific Reprojection Transformers (Recommended)
|
|
Library (External Links) |
---|---|---|
Reprojects x, y, and optionally z coordinates stored as attributes from one coordinate system to another using the CS-MAP library. |
||
Reprojects feature x, y, and optionally z coordinates from one coordinate system to another using the CS-Map library. |
||
Reprojects feature coordinates from one coordinate system to another using the Esri reprojection library. |
||
Great Britain Northern Ireland Republic of Ireland |
Reprojects feature coordinates from one coordinate system to another using the Grid InQuestII engine from Ordnance Survey, for use in Great Britain, Ireland, and Northern Ireland. |
|
Sweden |
Reprojects coordinates stored as attributes from one coordinate system to another using the Gtrans reprojection engine from the National Land Survey of Sweden (Lantmäteriet). |
|
Sweden |
Reprojects feature coordinates from one coordinate system to another using the Gtrans reprojection engine from the National Land Survey of Sweden (Lantmäteriet). |
|
Reprojects coordinates stored as attributes from one coordinate system to another using the PROJ library. |
||
Reprojects feature coordinates from one coordinate system to another using the PROJ library. |
||
Switzerland |
Reprojects feature coordinates from one coordinate system to another in Switzerland, using the Reframe library from the Federal Office of Topography (swisstopo). |
Configuration
Input Ports
Input
Features with attributes containing coordinates to be reprojected.
Output Ports
Output
Features with reprojected attributes as specified in parameters.
Parameters
General
X Attribute |
Provide the attribute containing the X coordinate to be reprojected. |
Y Attribute |
Provide the attribute containing the Y coordinate to be reprojected. |
Translation File |
Enter the path and filename of the desired Translation File. Files may be selected from the Gtrans Translation File gallery via the ellipsis button. |
Editing Transformer Parameters
Transformer parameters can be set by directly entering values, using expressions, or referencing other elements in the workspace such as attribute values or user parameters. Various editors and context menus are available to assist. To see what is available, click beside the applicable parameter.
How to Set Parameter Values
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.
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.
When setting values - whether entered directly in a parameter or constructed using one of the editors - strings and expressions containing String, Math, Date/Time or FME Feature Functions will have those functions evaluated. Therefore, the names of these functions (in the form @<function_name>) should not be used as literal string values.
Content Types
These functions manipulate and format strings. | |
Special Characters |
A set of control characters is available in the Text Editor. |
Math functions are available in both editors. | |
Date/Time Functions | Date and time functions are available in the Text Editor. |
These operators are available in the Arithmetic Editor. | |
These return primarily feature-specific values. | |
FME and workspace-specific parameters may be used. | |
Creating and Modifying User Parameters | Create your own editable parameters. |
Dialog Options - Tables
Table Tools
Transformers with table-style parameters have additional tools for populating and manipulating values.
Row Reordering
|
Enabled once you have clicked on a row item. Choices include:
|
Cut, Copy, and Paste
|
Enabled once you have clicked on a row item. Choices include:
Cut, copy, and paste may be used within a transformer, or between transformers. |
Filter
|
Start typing a string, and the matrix will only display rows matching those characters. Searches all columns. This only affects the display of attributes within the transformer - it does not alter which attributes are output. |
Import
|
Import populates the table with a set of new attributes read from a dataset. Specific application varies between transformers. |
Reset/Refresh
|
Generally resets the table to its initial state, and may provide additional options to remove invalid entries. Behavior varies between transformers. |
Note: Not all tools are available in all transformers.
For more information, see Transformer Parameter Menu Options.
Reference
Processing Behavior |
|
Feature Holding |
No |
Dependencies | Gtrans software and Translation Files, included with FME. |
Operating System Restrictions |
Win64, Win32, and Linux are supported. Not available on Mac. |
Aliases | |
History |
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 GtransAttributeReprojector on the FME Community.
Examples may contain information licensed under the Open Government Licence – Vancouver, Open Government Licence - British Columbia, and/or Open Government Licence – Canada.
Example contains data © OpenStreetMap contributors.
Keywords: SWEREF99 "National Land Survey of Sweden" Sweden