Skip to main content

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.

 

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)?


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.

 

 


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