Skip to main content
Solved

Build 3D Line using x,y,z text file

  • May 8, 2024
  • 7 replies
  • 140 views

offi24
Contributor
Forum|alt.badge.img+2

I have a .csv file with x, y, z coordinates. From these points, I want to create a 3D line. Currently, I have the issue that the z coordinates are not being transferred onto the line when I create a line from the points. Does anyone have an idea of how I can proceed?

Best answer by nielsgerrits

This works as expected. You see only one attribute because you set Accumulation Mode to Use Attributes From One Feature. But the actual 3d coordinates are in the line you see in the Graphics window in Visual Preview. If you want to keep all coordinates, check the Generate List box and configure it.

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.

7 replies

nielsgerrits
VIP
Forum|alt.badge.img+62

Multiple ways to do this.

One way is to read the CSV, define x,y,z colums as x,y,z coordinate. Then use a LineBuilder to connect the points.

Other was is to read the x,y,z as text, use a VertexCreator to create points from x,y,z, then the LineBuilder.


offi24
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • May 8, 2024

The issue is that when I do this, the z coordinates of the line are lost in the “LineBuilder”. So the line only takes the z-coordinate of the start, and the remaining data as well as the third dimension are lost.


nielsgerrits
VIP
Forum|alt.badge.img+62

The issue is that when I do this, the z coordinates of the line are lost in the “LineBuilder”. So the line only takes the z-coordinate of the start, and the remaining data as well as the third dimension are lost.

Not sure if I understand your issue. These steps produces 3D points and then 3D lines.

Can you share a sample of your data? Then I’ll create a workspace demonstrating this.


offi24
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • May 8, 2024

The input data looks like this. I cannot share the entire dataset with you, sorry. My script in FME is looking like this.

Thanks for your help


nielsgerrits
VIP
Forum|alt.badge.img+62

This works as expected. You see only one attribute because you set Accumulation Mode to Use Attributes From One Feature. But the actual 3d coordinates are in the line you see in the Graphics window in Visual Preview. If you want to keep all coordinates, check the Generate List box and configure it.


offi24
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • May 8, 2024

Perfect, it works. Thanks for your help

 


nielsgerrits
VIP
Forum|alt.badge.img+62

Cheers :)