Solved

Set Z values

  • 23 July 2018
  • 3 replies
  • 110 views

Badge +22
  • Contributor
  • 1959 replies

Is there a way to set different Z values for each vertex of a line/polygon from a list, like the MeasureSetter in Whole Line/Area mode?

 

 

The 3DForcer sets all the vertices to a single elevation, and the VertexCreator replace point at vertex i only does one vertex at a time.

 

icon

Best answer by takashi 24 July 2018, 00:50

View original

3 replies

Badge

Hi @jdh,

Personally, I'd do it in a PythonCaller/Creator, but using transformers, you could try the VertexExtractor from FME Hub perhaps? Then join the Z values in your list (based on the vertex id and some line/polygon break attribute), set the height using the 3DForcer and reassemble the lines/polygons using a PointConnector (but use the Sorter first)?

Badge +22

Hi @jdh,

Personally, I'd do it in a PythonCaller/Creator, but using transformers, you could try the VertexExtractor from FME Hub perhaps? Then join the Z values in your list (based on the vertex id and some line/polygon break attribute), set the height using the 3DForcer and reassemble the lines/polygons using a PointConnector (but use the Sorter first)?

I've done it in Python before, but most of my colleagues are not comfortable with Python.

 

 

Userlevel 2
Badge +17

Hi @jdh, you can call the @ZValue function (one of FME Feature Functions) with the FMEFunctionCaller. Assuming that the "_list{}" contains z values for the line/polygon:

@ZValue(_list{})

Notes:

  • Input geometry should be 2D.
  • The number of list elements should be exactly equal to the number of geometry coordinates.
  • If the input geometry type is polygon, the last element of the list should be equal to the first element (i.e. the resulting vertices should be closed in 3D).

Reply