FME Transformers: 2024.2
FME Transformers: 2024.2
PROJReprojector
Typical Uses
- Reprojecting features when explicitly using the PROJ library is desired
How does it work?
The PROJReprojector receives raster, vector, or point cloud features and reprojects their coordinates from one coordinate system to another, using PROJ coordinate system definitions and PROJ reprojection library.
FME currently uses PROJ version 9.5.0.
The transformation can be automatically or manually configured. For Automatic transformations, the Source Coordinate System may be read from the features or specified explicitly, and the Destination Coordinate System must be specified.
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.
Adding Grids Manually
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.
Accessing Online Grids
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 |
Order of Preference
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.
Rasters
Additional parameters are available for raster features, specifying how the reprojected cells are to be interpolated.
This transformer is not affected by raster band and palette selection.
Examples
Example: Manual Transformation with a PROJ pipeline
In this example, we have a shapefile of food cart vendors, with a UTM Zone 10 NAD27 coordinate system. We want to reproject this to NAD83, using PROJ.
The features are routed into a PROJReprojector.
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.
The Output Coordinate System Tag is set to UTM83-10, ensuring that FME can correctly identify the PROJ output.
The output features have been reprojected using the PROJ library, and FME can identify them as UTM83-10.
Example: WKT2 Transformation Description
The previous example could also be performed using Well-Known Text (WKT2) to describe the transformation.
WKT2 Transformation Description
Copy
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]]]
Example: Manual Transformation with Epoch
This example shows the PROJReprojector 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
- 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 Reprojector 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 attribute values, consider using the PROJAttributeReprojector.
- 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 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 geometry to be reprojected.
Output Ports
Reprojected
Features reprojected as specified in parameters.
Parameters
Transformation Type
Type |
Select a method for applying a transformation.
|
Automatic Transformation Parameters
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. |
Manual Transformation Parameters
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. |
Output Coordinate System Tag
Coordinate System |
(Optional) Specify an FME coordinate system to tag the output features with. This will override the coordinate system selected by FME if an Automatic Transformation is being done. It is optional, but recommended that this parameter is always used when doing Manual Transformations to ensure FME handles the resulting features correctly during further processing. |
Raster Parameters
Interpolation Type |
Select a method for interpolating reprojected cell values:
|
||||||||||
Cell Size |
Select a method for resizing cells:
|
||||||||||
Tolerance (cells) |
Sets the tolerance, in cells, for approximating reprojected cell locations. Using the default value of 0.0, every cell will be reprojected. If a value greater than 0.0 is specified, some cell locations will be approximated. The difference between an approximated cell location and the true cell location should be at most the tolerance value. For example, if a value of 0.5 is specified, each approximated cell location should be maximum one-half of a pixel away from its true location. Increasing the Tolerance value may improve performance. |
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 | None |
Aliases | |
History |
FME Community
The FME Community has a wealth of FME knowledge with over 20,000 active members worldwide. Get help with FME, share knowledge, and connect with users globally.
Search for all results about the PROJReprojector 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.