PROJAttributeReprojector
Reprojects coordinates stored as attributes from one coordinate system to another using the PROJ library.
Typical Uses
- Reprojecting features when explicitly using the PROJ library is desired
- Adding additional coordinate pairs as attributes, in alternate coordinate systems
How does it work?
The PROJAttributeReprojector accepts any feature. The user specifies the attributes containing x, y, and optionally z coordinates, and configures either an Automatic or Manual Transformation.
The transformer reprojects the coordinates according to these selections, using the PROJ reprojection library, and updates the x, y, and z 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 specification of the source coordinate system.
FME currently uses PROJ version 9.2.0.
For Automatic transformations, the Source Coordinate System and Destination Coordinate System must be specified explicitly.
For Manual transformations, a PROJ string must be provided describing the desired transformation, as documented at PROJ’s Transformation Pipelines and shown in the examples further below. WKT2 descriptions are also valid.
Coordinate System Definitions
This transformer will accept coordinate systems defined in any one of the following forms.
Definition Style |
Example: LL-WGS84 Defined |
External Reference |
---|---|---|
EPSG Number |
EPSG:4326 |
|
Well-Known Text (WKT1 or WKT2) |
GEODCRS["WGS 84", DATUM["World Geodetic System 1984", ELLIPSOID["WGS 84",6378137,298.257223563, LENGTHUNIT["metre",1.0]]], CS[ellipsoidal,2], AXIS["latitude",north,ORDER[1]], AXIS["longitude",east,ORDER[2]], ANGLEUNIT["degree",0.01745329252], ID["EPSG",4326]] |
Open Geospatial Consortium: Geographic information — Well-known text representation of coordinate reference systems Note that the EPSG website can also provide WKT strings for specific coordinate systems. |
PROJ String |
+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs |
They are fully interchangeable and can be used in any combination to define the Source and Destination Coordinate System for an Automatic transformation.
They may also be used in a PROJ string or pipeline for a Manual transformation.
Note that EPSG and WKT representations can more fully describe a coordinate system than PROJ strings, and so are the preferred definition types.
Geographic Transformations and Grids
Geographic Transformations control how coordinates are converted between different datums.
For an Automatic Transformation, FME will attempt to select an appropriate transformation between the Source and Destination coordinate systems.
Manual Transformations are performed as specified in the Manual Transformation Parameters.
Grid-Based Datum Adjustments
Some areas use grid shift files for datum conversion.
Many grids needed by PROJ are included with FME, and additional grids may be downloaded from the PROJ website.
PROJ will generally search for an appropriate grid to use, although specific paths or URLS may be specified in a transformation definition.
Grid shift files can be stored locally if preferred.
The PROJ website’s Download page includes grids, in archives named proj-data*.* To use them:
-
Download a proj-data archive. The Current Release version is generally appropriate. Do not use the older proj-datumgrid*.* archives.
-
Extract the archive’s contents to the ProjData directory (or a subdirectory thereof) in the FME user directory, per operating system:
~/.fme/ProjData on Linux
~/Library/Application Support/FME/ProjData on macOS
Documents/FME/ProjData on Windows
Grids added in this way will be considered before online grids (if enabled). They will also be considered first in order of preference, unless an absolute or relative path or URL is specified in the transformation definition.
FME can also access PROJ grids online at cdn.proj.org.
Online access may be enabled or disabled via the FME Form menu - Tools > FME Options > Coordinate Systems:
Online Grids Enabled |
When enabled, PROJ in FME will search the specified CDN Endpoint for appropriate grids if necessary and according to the order of preference. Default is Enabled. |
Maximum Cache Size (MB) |
Default is -1 (Unlimited). Optionally, specify a maximum size in Megabytes allotted for caching grids. |
CDN Endpoint |
Specify a URL to access for grids. The default is provided by PROJ: https://cdn.proj.org |
PROJ will look for an appropriate grid, which can be accessed in a number of places. The search order is:
-
If the transformation definition contains an absolute or relative path to a grid shift file, only that file will be considered. If it cannot be found, processing terminates with an error.
-
If the transformation definition contains a URL for grid shift file (that is, starting with http:// or https://), PROJ will attempt to download the file. If it cannot be found, processing terminates with an error.
-
If the transformation definition contains only a grid file name with no path or URL, PROJ will search in this order:
-
FME configured search paths:
-
- Reproject directory in the installation directory
-
- ProjData directory in the FME user directory
-
-
The user-writable directory, such as:
-
AppData/Local/proj on Windows
- ~/.local/share/proj on Linux
- ~/Library/Application Support/proj on macOS
-
-
The list of directories specified in the PROJ_LIB environment variable.
-
The directory the FME workspace file is stored in (the working directory for a translation).
-
If the file name is not found, PROJ will search for known aliases in the same order:
-
eg: ca_nrc_ntv2_0.tif has ntv2_0.gsb as an alias
-
-
If no known aliases are found, and Online Grids is enabled, PROJ will attempt to download the grid from the specified CDN Endpoint.
-
If networking fails, then PROJ’s options are exhausted and an error is returned.
-
PROJ User Data
Grids and customized proj.db files may be placed in your [FME User Directory]/ProjData folder.
Sample ProjData folder locations:
macOS |
/Users/[User]/Library/Application\ Support/FME/ProjData/ |
Windows 10 |
C:\Users\[User]\Documents\FME\ProjData |
Linux |
/home/[User]/.fme/ProjData |
PROJ transformers will give preference to files placed in this folder over other locations, including the proj.db and grid files shipped with FME.
Examples
In this example, we start with a CSV file of Historic Sites. It has no geometry, but it does contain coordinates for the sites, with a UTM Zone 10 NAD27 coordinate system. We want to reproject this to NAD83, using PROJ.
The features are routed into a PROJAttributeReprojector.
In the parameters dialog, Transformation Type is set to Manual Transformation.
The required PROJ pipeline string is entered, which references both the source and destination coordinate system definitions and the desired grid shift file.
Both the X and Y Attributes containing the coordinates are identified.
The new coordinates are calculated using the PROJ library, and replace the existing attribute values. The transformer does not create geometry, it only supplies values.
The previous example could also be performed using Well-Known Text (WKT2) to describe the transformation.
WKT2 Transformation Description
CONCATENATEDOPERATION["Inverse of UTM zone 10N + NAD27 to NAD83 (4) + UTM zone 10N",
SOURCECRS[
PROJCRS["NAD27 / UTM zone 10N",
BASEGEOGCRS["NAD27",
DATUM["North American Datum 1927",
ELLIPSOID["Clarke 1866",6378206.4,294.978698213898,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4267]],
CONVERSION["UTM zone 10N",
METHOD["Transverse Mercator",
ID["EPSG",9807]],
PARAMETER["Latitude of natural origin",0,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8801]],
PARAMETER["Longitude of natural origin",-123,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8802]],
PARAMETER["Scale factor at natural origin",0.9996,
SCALEUNIT["unity",1],
ID["EPSG",8805]],
PARAMETER["False easting",500000,
LENGTHUNIT["metre",1],
ID["EPSG",8806]],
PARAMETER["False northing",0,
LENGTHUNIT["metre",1],
ID["EPSG",8807]]],
CS[Cartesian,2],
AXIS["(E)",east,
ORDER[1],
LENGTHUNIT["metre",1]],
AXIS["(N)",north,
ORDER[2],
LENGTHUNIT["metre",1]],
ID["EPSG",26710]]],
TARGETCRS[
PROJCRS["NAD83 / UTM zone 10N",
BASEGEOGCRS["NAD83",
DATUM["North American Datum 1983",
ELLIPSOID["GRS 1980",6378137,298.257222101,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4269]],
CONVERSION["UTM zone 10N",
METHOD["Transverse Mercator",
ID["EPSG",9807]],
PARAMETER["Latitude of natural origin",0,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8801]],
PARAMETER["Longitude of natural origin",-123,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8802]],
PARAMETER["Scale factor at natural origin",0.9996,
SCALEUNIT["unity",1],
ID["EPSG",8805]],
PARAMETER["False easting",500000,
LENGTHUNIT["metre",1],
ID["EPSG",8806]],
PARAMETER["False northing",0,
LENGTHUNIT["metre",1],
ID["EPSG",8807]]],
CS[Cartesian,2],
AXIS["(E)",east,
ORDER[1],
LENGTHUNIT["metre",1]],
AXIS["(N)",north,
ORDER[2],
LENGTHUNIT["metre",1]],
ID["EPSG",26910]]],
STEP[
CONVERSION["Inverse of UTM zone 10N",
METHOD["Inverse of Transverse Mercator",
ID["INVERSE(EPSG)",9807]],
PARAMETER["Latitude of natural origin",0,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8801]],
PARAMETER["Longitude of natural origin",-123,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8802]],
PARAMETER["Scale factor at natural origin",0.9996,
SCALEUNIT["unity",1],
ID["EPSG",8805]],
PARAMETER["False easting",500000,
LENGTHUNIT["metre",1],
ID["EPSG",8806]],
PARAMETER["False northing",0,
LENGTHUNIT["metre",1],
ID["EPSG",8807]],
ID["INVERSE(EPSG)",16010]]],
STEP[
COORDINATEOPERATION["NAD27 to NAD83 (4)",
SOURCECRS[
GEOGCRS["NAD27",
DATUM["North American Datum 1927",
ELLIPSOID["Clarke 1866",6378206.4,294.978698213898,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
AXIS["geodetic latitude (Lat)",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4267]]],
TARGETCRS[
GEOGCRS["NAD83",
DATUM["North American Datum 1983",
ELLIPSOID["GRS 1980",6378137,298.257222101,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
AXIS["geodetic latitude (Lat)",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4269]]],
METHOD["HORIZONTAL_SHIFT_GTIFF"],
PARAMETERFILE["Latitude and longitude difference file","ca_nrc_ntv2_0.tif"],
OPERATIONACCURACY[1.5],
ID["DERIVED_FROM(EPSG)",1313]]],
STEP[
CONVERSION["UTM zone 10N",
METHOD["Transverse Mercator",
ID["EPSG",9807]],
PARAMETER["Latitude of natural origin",0,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8801]],
PARAMETER["Longitude of natural origin",-123,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8802]],
PARAMETER["Scale factor at natural origin",0.9996,
SCALEUNIT["unity",1],
ID["EPSG",8805]],
PARAMETER["False easting",500000,
LENGTHUNIT["metre",1],
ID["EPSG",8806]],
PARAMETER["False northing",0,
LENGTHUNIT["metre",1],
ID["EPSG",8807]],
ID["EPSG",16010]]],
USAGE[
SCOPE["unknown"],
AREA["Canada - onshore - Alberta; British Columbia; Manitoba; New Brunswick; Newfoundland and Labrador; Northwest Territories; Nova Scotia; Nunavut; Ontario; Prince Edward Island; Quebec; Saskatchewan; Yukon; offshore east coast."],
BBOX[40.04,-141.01,83.17,-47.74]]]
This example shows the PROJAttributeReprojector parameters configured to use an epoch with a PROJ pipeline.
Note that the desired deformation model is referenced in the pipeline string.
Epochs may also be provided via an attribute value or user parameter.
Usage Notes
- This transformer does not change the feature's coordinates – it only changes the values of the selected X, Y, and Z attributes (if they contain coordinate values).
- Earlier versions of PROJ used the proj-datumgrid grid files package, which is still available on the PROJ website. It should be replaced by the current proj-data package.
- 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 does not handle z values.
- To reproject coordinates stored as geometry, consider using the PROJReprojector.
- Automatic Transformations will produce a PROJ pipeline string in the log, which can be used as a template for Manual Transformations.
Working With Coordinate System Transformers
FME inherently supports coordinate system transformations and reprojections.
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
Features with attributes containing coordinates to be reprojected.
Output Ports
Features with reprojected attributes as specified in parameters.
Parameters
Type
|
Select a method for applying a transformation.
|
Source Coordinate System |
If Transformation Type is Automatic Transformation, specify the coordinate system of the incoming features. The default is <Read from feature>, which reads the features’ existing coordinate system(s). Coordinate systems may also be explicitly selected from the Coordinate System Gallery, entered directly, or provided via an attribute value or user parameter. Acceptable forms include EPSG number, WKT2 string, or PROJ string (excluding pipelines). |
Destination Coordinate System |
If Transformation Type is Automatic Transformation, specify the coordinate system to be reprojected to. Coordinate systems may be explicitly selected from the Coordinate System Gallery, entered directly, or provided via an attribute value or user parameter. Acceptable forms include EPSG number, WKT2 string, or PROJ string (excluding pipelines). Note that FME will attempt to determine what the destination coordinate system’s corresponding FME coordinate system is, and tag the output features with it, unless an override is specified by Output Coordinate System Tag. |
Epoch |
Used for spatiotemporal transformations. A decimal year that represents the time dimension to be used in the transformation pipeline. |
Transformation |
If Transformation Type is Manual Transformation, specify a complete transformation in the form of a PROJ string (including multiple-step pipelines) or WKT2. For more information see Transformation pipelines at PROJ. Note that when reprojecting rasters or point clouds, the transformation specified here must be invertible. |
X Attribute |
Provide the attribute containing the X coordinate to be reprojected. |
Y Attribute |
Provide the attribute containing the Y coordinate to be reprojected. |
Z Attribute |
Provide the attribute containing the Z coordinate to be reprojected. |
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.
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.
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
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.
Reference
Processing Behavior |
|
Feature Holding |
No |
Dependencies | None |
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 PROJAttributeReprojector on the FME Community.
Examples may contain information licensed under the Open Government Licence – Vancouver and/or the Open Government Licence – Canada.