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.
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), KML, OGC Open GeoSMS, OGC Well Known Binary (wkb), OGC Well Known Text (wkt) or Parseable Encoded FME XML.
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 Encoded Polyline encodings are useful if working with the Google Maps API and can be used to represent points, lines and polygons.
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 Geometry Encoding is GML, this parameter can be used to force interpretation of the <gml:pos> and <gml:posList> into a particular axis order.
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 OGC Well Known Text, this parameter can be used to control the precision used when converting numerical strings to floating point.
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.
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.
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.
FME Licensing Level
FME Professional edition and above
This transformer contains the functionality of the now-deprecated OGCGeometryReplacer and XMLGeometryReplacer.
Search FME Knowledge Center
Search for samples and information about this transformer on the FME Knowledge Center.