Extracts the geometry of a feature according to the setting of the geometry encoding parameter.
The resulting encoded geometry is added to the feature in an attribute. This attribute can later be restored as the feature's geometry via the GeometryReplacer transformer.
This transformer is often used to make a copy of the feature's geometry into an attribute before some temporary geometry change is made, so that it can later be restored. Alternately, the geometry may be extracted to be stored in a database or other file format that cannot handle geometry, but can handle large attributes as blobs or text strings. Later, FME can read this data back and restore the geometry via the GeometryReplacer transformer.
Features whose geometry was successfully encoded into the Destination Geometry Attribute are output through this port.
Features whose geometry could not be extracted into the chosen encoding are output through this port.
Rejected features will have an fme_rejection_code attribute with one of the following values: INVALID_FEATURE_LOCATION, INVALID_GEOMETRY_VERTICES.
Note: Feature order may change in relation to other output ports. Feature order per port is maintained.
This parameter can be set to Encoded Polyline, Esri JSON, FME Binary, FME XML, Geo (Microformat), Geohash, GeoJSON, GeoRSS Simple, 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), 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 the FME Geometry Model, 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 be lost in these modes; for instance, any path will be flattened into a single linestring.
The GeoJSON, Esri JSON, and GeoRSS Simple encodings may not preserve all geometry characteristics. For example, arcs will be stroked to lines, and ellipses stroked to polygons. These encodings also do not support measures.
The Geohash encoding will not preserve any geometry characteristics. Instead, they will be converted to a point represented by a geohash.
The OGC Open GeoSMS, Geotagging GeoSMS, and Geo encodings will not preserve any geometry characteristics. For example: arcs, polygons, ellipses, etc., will be converted into a point at the center of their bounding box and will then be encoded to their respective formats. If the geometry has a coordinate system other than LL-WGS84, a temporary copy will be created and reprojected; however, the source geometry will not be modified.
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 ISO 6709 Geographic Point encoding serializes a geometry into the ISO 6709 point format. Non-point geometries are serialized as a sequence of geographic points.
The MGRS encoding calculates a Military Grid Reference System (MGRS) code based on the geometry of a feature. The MGRS code for a position consists of a group of letters and numbers which include the following elements:
- grid zone designation
- the 100,000-meter square letter identification
- the grid coordinates (also referred to as rectangular coordinates); the numerical portion of the reference expressed to a desired refinement
For MGRS, if a non-point feature (that is, a feature with more than one point) is passed in, then the first point of the geometry will be used for the conversion.
The Microsoft SQL Server Binary encoding is used to serialize geometries to the native storage format used in Microsoft SQL Server.
The name of the attribute that will hold the encoded geometry.
Removes geometry after extraction. The default value is No. If the value is set to Yes, the geometry will be removed from the feature after it has been extracted into an attribute. This option can be useful for saving memory space if the true geometry will no longer be needed.
Encoded Polyline Parameters
The name of the attribute that will hold the encoded levels of a polyline.
You can chose the length in characters of the resulting geohash; this also shows the approximate precision. Please note that the precision of a geohash is limited by the precision of the source geometry.
For XML output formats (except FME XML), this parameter controls whether or not the output contains XML namespace declarations. All well-formed XML output must contain namespace declarations. However, if you are manually inserting the transformer output into a larger XML document, you may want to omit the namespace declarations.
Determines if FME writes the Geometries as a gml:Polygon or a gml:PolygonPatch. The default value is 'no', which prints out gml:Surface geometries. If 'yes', FME creates the geometry as a gml:Polygon in the output.
This parameter can overwrite the CRS value that is written in the GML instance’s srsName attributes.
By default, the FME coordinate system name in a feature is transferred directly onto the srsName attribute. Using this parameter allows you to provide your own URN CRS string for the srsName attributes.
This parameter specifies the axis order for a coordinate tuple in a GML <pos> or <posList> element.
The valid values are:
There is no default value.
This parameter is enabled when Geometry Encoding is GeoJSON or EsriJSON. The transformer uses this value to limit the number of decimal digits printed for each coordinate. Valid values are 1 to 15. The default value is 7, which gives roughly 1 centimeter accuracy when writing WGS84 coordinates. A lower number of digits can dramatically reduce the size of the output JSON data.
You can choose between versions 1.1 and 1.2.
Version 1.2 contains two key improvements: support for measures and z-values. Note that the only measure considered when producing an OGC representation is the "default" (unnamed) measure.
The precision of the strings used to represent the coordinates of the geometry. The options are:
- 64-bit: Enough precision to store all double-precision IEEE floating point numbers.
- 32-bit: Enough precision to store all single-precision IEEE floating point numbers.
This parameter allows you to choose the URL of the mapping service to be used by the OGC Open GeoSMS. The default value is Google Maps.
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.
The granularity of the resulting code is determined by the specified Precision which is an integer from 0 to 5 (inclusive). A precision of 5 locates a point within 1-meter square and a precision of 0 locates a point within 100-km square.
MS SQL Server Parameters
If Geometry Encoding is Microsoft SQL Server Binary, choose whether it is a serialized Geometry or Geography.
ISO 6709 Geographic Point Parameters
Indicates the encoding for the lat/long coordinates. The coordinates of the feature will be treated as degrees, regardless of any specified coordinate systems. The Reprojector transformer can be used to first convert other coordinate systems into lat/long coordinates.
Specifies the maximum number of decimal places.
GeometryExtractor does not perform any repairs to feature geometries during extraction. Geometries are extracted in their current state.
Be sure to position this transformer as close as possible to where the geometry attribute is being used. Positioning the transformer too early can cause unnecessary use of system resources.
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 OGCGeometryExtractor and XMLGeometryExtractor.
Associated FME function or factory: @Geometry, @OGCGeometry, @JSONGeometry, @GeoRSSGeometry, @GMLGeometry, @KMLGeometry
Search FME Community
Search for samples and information about this transformer on the FME Community.