Skip to main content

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)

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


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.

 


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)

 


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.


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. 


Reply