CoordinateExtractor

Retrieves either specified individual coordinates or all coordinate values from geometry, adding them to the feature as attributes.    

Jump to Configuration

Typical Uses

  • Extracting coordinate values into attributes for manipulation or use elsewhere.

How does it work?

The CoordinateExtractor receives any type of geometry, and retrieves either one specified coordinate or all coordinates, adding them to the feature as attributes.

If Specify Coordinate is used, retrieving only one coordinate, the coordinate is identified by its Coordinate Index, which may be either entered as an integer or specified with an attribute value, expression, user parameter, or conditional value. A coordinate index always starts at zero (0). 0 indicates the first vertex (or only vertex of a point geometry), and a negative index can be used to indicate position relative to the last vertex where -1 is the last coordinate, -2 is the second-to-last, and so on. If the index number is invalid, the feature will be rejected.

If All Coordinates is used, retrieving coordinates for all vertices, the values will be added to a list attribute which may be further manipulated with list-based transformers. A list is returned even when the incoming feature possesses just a single vertex.

A Default Z Value may be optionally provided, and is applied where no z coordinate value exists.This too can be provided by an attribute, expression, user parameter, or conditional value.

If the input feature is a raster or point cloud, All Coordinates will return its extents, and Specify Coordinate will return the requested vertex on the bounding box (0, 1, 2, 3, 4). If the input feature is multi-part or aggregate, each part’s coordinates are indexed sequentially.

Examples

Usage Notes

  • Extracted coordinates may be reprojected into another coordinate system using the AttributeReprojector.
  • All vertices can be retrieved as a delimited attribute (instead of a list) using the CoordinateConcatenator.
  • The first coordinate index is 0 and the last coordinate index is -1. In a polygon feature, or a line feature that closes on itself, these two vertices should return the same coordinate values.
  • To retrieve the center point of a feature, use the CenterPointExtractor or CenterPointReplacer.

Configuration

Input Ports

Output Ports

Parameters

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.

Dialog Options - Tables

Transformers with table-style parameters have additional tools for populating and manipulating values.

Reference

Processing Behavior

Feature-Based

Feature Holding

No

Dependencies None
FME Licensing Level FME Base Edition and above
Aliases CoordinateFetcher
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 CoordinateExtractor on the FME Community.

 

Examples may contain information licensed under the Open Government Licence – Vancouver and/or the Open Government Licence – Canada.