FME Transformers: 2024.1

Categories
Calculated Values
Coordinates
Related Transformers
AttributeReprojector
CenterPointExtractor
CenterPointReplacer
CoordinateConcatenator
CoordinateRounder
CoordinateSwapper
CoordinateSystemExtractor
DimensionExtractor
ElevationExtractor
VertexCounter

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

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.

For more information, see Transformer Parameter Menu Options.

Reference

Processing Behavior

Feature-Based

Feature Holding

No

Dependencies None
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, Open Government Licence - British Columbia, and/or Open Government Licence – Canada.