Skip to main content
Solved

I want to present 3D data along a line with breakpoints. For this to work I need the line to be presented as a straight line so first I need "to straighten the line" and this is where I fail

  • January 15, 2024
  • 4 replies
  • 48 views

peteralstorp
Contributor
Forum|alt.badge.img+7

Hi, fellow FMEers! I a problem that I cannot solve. I want to present 3D data along a line with breakpoints. In my script I want the line to be presented as a straight line (a profile).

 

It is important that the length of the line parts are correct but it doesn't matter where the resulting parts start.

 

The data input line is drawn from start to end but can begin and end anywhere (from west to east, north to south and so forth...).

 

Any hints or suggestions?

 

image

Best answer by nielsgerrits

Credits to my buddies @work, this was a team effort :)

  • Chopper to chop the line into lines of 2 vertices.
  • LengthCalculator to get 3D length.
  • StatisticsCalculator to calculate cumulative lengths.
  • VertexCreators to recreate segments.

 

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

david_r
Celebrity
  • January 15, 2024

You could split up the parts (Deaggregator and/or Chopper), followed by a LengthCalculator to get the 3D length of each part as an attribute. You can then iterate over the parts and reconstruct them in 2D space, e.g. using the VertexCreator (Replace with point + Add point). If you start at (0,0) and go from there it should be easy to line them up. You can then shift them later, if necessary (Offsetter, or the like).


nielsgerrits
VIP
Forum|alt.badge.img+62
  • Best Answer
  • January 15, 2024

Credits to my buddies @work, this was a team effort :)

  • Chopper to chop the line into lines of 2 vertices.
  • LengthCalculator to get 3D length.
  • StatisticsCalculator to calculate cumulative lengths.
  • VertexCreators to recreate segments.

 

 


peteralstorp
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • January 15, 2024

You could split up the parts (Deaggregator and/or Chopper), followed by a LengthCalculator to get the 3D length of each part as an attribute. You can then iterate over the parts and reconstruct them in 2D space, e.g. using the VertexCreator (Replace with point + Add point). If you start at (0,0) and go from there it should be easy to line them up. You can then shift them later, if necessary (Offsetter, or the like).

@david_r​  Thank you, David! Much appreciated.


peteralstorp
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • January 15, 2024

Credits to my buddies @work, this was a team effort :)

  • Chopper to chop the line into lines of 2 vertices.
  • LengthCalculator to get 3D length.
  • StatisticsCalculator to calculate cumulative lengths.
  • VertexCreators to recreate segments.

 

 

@nielsgerrits​ And for that team effort I'm very grateful. Thank you so much!