Skip to main content

Hi, I have 2 lines and they have real elevation value (z value). I want to add lines which exaclty middle of 2 lines. Also the new line should has actual z value . ( average z of 2 lines). How can I do?

Hi @bayram​ thanks for your question! From your description my understanding is that you would like this new line to have the same vertices as the other two lines but with z values elevation) that are between them as a vertical center line? There might be a couple of ways to achieve this, but here's one:

  • exposing the vertices coordinates of each line (CoordinateExtractor & ListExploder)
  • join on list indices, with z value attributes having two different names (FeatureMerger/FeatureJoiner)
  • calculating the middle value (difference/2)+z (AttributeCreator/AttributeManager/ExpressionEvaluator)
  • replace the lines with points using the new z values (VertexCreator)
  • rebuilding the line, but make sure it is sorted correctly first (LineBuilder)

imageHope this helps, or provides you with some ideas!


Reply