Skip to main content
Question

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


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)

5 replies

drc43
Contributor
Forum|alt.badge.img+11
  • Contributor
  • 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
  • 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+38
  • Influencer
  • November 6, 2020
jakomies wrote:

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
  • November 6, 2020
ebygomm wrote:

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+38
  • Influencer
  • November 6, 2020
ebygomm wrote:

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. 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings