GeometryReplacer
Replaces the geometry of a feature according to the setting of the geometry encoding parameter. This transformer is typically used to restore geometry previously extracted into an attribute by the GeometryExtractor.
Parameters
This parameter can be set to Encoded Polyline, Esri JSON, FME Binary, FME XML, Geo (Microformat), Geohash, GeoJSON, GeoRSS Simple Encoding, Geotagging GeoSMS (RFC 5870), GML, hexadecimal-encoded FME Binary, hexadecimal-encoded OGC Well Known Binary (wkbhex), ISO 6709 Geographic Point, KML, MGRS, Microsoft SQL Server Binary, OGC Open GeoSMS, OGC Well Known Binary (wkb), OGC Well Known Text (wkt), Parseable Encoded FME XML, or QlikMaps Encoded Polyline.
The most efficient and truest representation of the geometry is FME Binary, and this should be used in most cases. All the FME representations can accommodate all aspects of FME Enhanced Geometry, including measures and paths consisting of multiple linear segments; however, both the FME XML and Hex Encoded FME Binary representations impose some overhead in translating between the internal binary representation and the ASCII-encoded representation.
The OGC variants are useful if interaction with other OGC supporting systems is required. However, some characteristics of geometries may have been lost in these modes; for instance, any path will be flattened into a single linestring. For OGC Well Known Text and OGC Well Known Binary, if measures are specified in the source, they will be saved as the "default" (unnamed) measure on the generated geometry.
When converting from WKT or WKB, if the specified attribute has a blank value, the feature's geometry will be left untouched and a warning will be output. This is important to remember if a GeometryExtractor was used to generate an attribute which was used in this transformer, because that transformer produces an empty value whenever it encounters a feature with no geometry.
The Parseable Encoded FME XML option is used to take the geometry representation used by the Creator transformer and set the geometry from that.
The GeoJSON, Esri JSON and GeoRSS encodings may not preserve all geometry characteristics. For example, arcs will be stroked to lines, and ellipses stroked to polygons. GeoJSON does not support measures.
The GML encoding option is used to de-serialize GML geometries. If more than one geometry is found in the source geometry, then an aggregate of the geometries is returned.
The Geohash encoding option stores the geometry as a string of characters that can be decoded as either a point or a rectangular area.
The OGC Open GeoSMS, Geotagging GeoSMS and Geo (Microformat) encoding options will extract a point from the given format.
The ISO 6709 Geographic Point encoding is used to de-serialize ISO 6709 geographic points into point geometries. A multi point geometry is created if the source data contains multiple geographic points.
The Encoded Polyline encoding is useful if working with the Google Maps API and can be used to represent points, lines and polygons.
The QlikMaps Encoded Polyline encoding is like the Encoded Polyline encoding, but it can also be used to represent donuts and multi areas.
The MGRS encoding is used to convert Military Grid Reference System (MGRS) code to longitude and latitude coordinates. The geometry of an input feature will be replaced with a point at the longitude/latitude values obtained from the MGRS code.
The Microsoft SQL Server Binary encoding is used to de-serialize geometries from the native storage format used in Microsoft SQL Server.
The encoded representation of the geometry to assign to the feature. An attribute can be selected if one contains this value, or text may be entered directly or fetched from a workspace parameter.
If this parameter is set to Yes, the attribute specified in Geometry Source will be removed from the resulting feature. This parameter has no effect if an attribute was not specified.
Encoding Specific Parameters
You can choose to decode a geohash as either a point or a rectangular area. If decoded as a point, the area information is stored as attributes.
If Geometry Encoding is GML, this parameter can be used to force interpretation of the <gml:pos> and <gml:posList> into a particular axis order.
The ellipsoid used for the conversion. This can be any ellipsoid name supported by FME.
The type of lettering used can be WGS84 or Bessel.
If Geometry Encoding is Microsoft SQL Server Binary, choose whether it is a serialized Geometry or Geography.
If Geometry Encoding is OGC Well Known Text, this parameter can be used to control the precision used when converting numerical strings to floating-point.
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.
FME Licensing Level
FME Professional edition and above
Transformer History
This transformer contains the functionality of the now-deprecated OGCGeometryReplacer and XMLGeometryReplacer.
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 samples and information about this transformer on the FME Community.