Skip to main content
Question

Is it possible to extract coordinates in Text-/Arithmetic Editor?

  • November 4, 2020
  • 5 replies
  • 24 views

jakomies

I need to do some comparison and tricks with z-coordinates in AttributeCreator transformer. Of course I can use CoordinateExtractor before AttributeCreator but it would be more useful to do the stuff inside AttributeCreator.

Something like (z-value for fourth coordinate in polyline) : @Evaluate($(fme_geometry).{3}.z)

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

drc43
Contributor
Forum|alt.badge.img+11
  • Contributor
  • 83 replies
  • November 5, 2020

It is possible. There are functions for X, Y, and Z coordinates in the FME Feature Functions. They can be used in either the text or arithmetic editor.coordinates


jakomies
  • Author
  • 6 replies
  • November 6, 2020

Nope. Those functions returns the value of the first coordinate of the feature. You can't specify the sequence number of the desired point/vertex of the feature.

 


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • November 6, 2020

Nope. Those functions returns the value of the first coordinate of the feature. You can't specify the sequence number of the desired point/vertex of the feature.

 

I think i might be missing something, yes it's one extra transformer, but why can't you extract the coordinates to a list and reference them in your AttributeCreator?

@Value(_indices{3}.z)

 


jakomies
  • Author
  • 6 replies
  • November 6, 2020

I think i might be missing something, yes it's one extra transformer, but why can't you extract the coordinates to a list and reference them in your AttributeCreator?

@Value(_indices{3}.z)

 

Yes I can , but...

My actual need is quite complex with Huge datasets (not Big Data 😉). 

I am using e.g. Conditional  Value. If certain conditions are met then z-coordinate is used. Only 4-5% of features meet those criteria's and z is needed. And only z, not x and y.  If I can skip CoordinateExtractor lot of time and system resources is saved.


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • November 6, 2020

I think i might be missing something, yes it's one extra transformer, but why can't you extract the coordinates to a list and reference them in your AttributeCreator?

@Value(_indices{3}.z)

 

Then it sounds like a tester to evaluate the first condition and then a coordinate extractor to only extract coordinates for those that meet the condition might save time in this instance, although more transformers required and perhaps not quite so neat workspace wise.