Skip to main content
Question

Attach point name to a line


offi24
Contributor
Forum|alt.badge.img+2

Hi, 

I have a problem. I just created a line out of multiple points of an x,y,z text file with the LineBuilder tool. The problem is that the points name are lost. After the LineBuilder I use a Chopper to split the line into segments. Now I want to add a new attribute to the line segments, which has the initial names of the points. Because due to the LineBuilder the names are lost and are everywhere the same. How can I do that?

5 replies

jkr_wrk
Influencer
Forum|alt.badge.img+28
  • May 10, 2024

So you connect all the points to one large line and then chop them into single two vertex segments?

Is there a way you only build lines from the points that should be the line, and not a long line that you chop afterward?

If both points have an attribute, do you want both point attributes to the line or just the first?

Do both points have the same attribute? Could you use that as a GroupBy setting?


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

Yes, I have points with x,y,z coordinates every meter. The points have different names, regarding on the place they have along a rail axis. The names are for ex. like the following: 5.3+25.0000 or 5.3 +26.000. Now in a following step I want to split the line for example every 50 meters to create a new segment. The name attribute should not be lost. For the beginning it would be good, if the attribute for the first point should be kept. 

 

“Is there a way you only build lines from the points that should be the line, and not a long line that you chop afterward?”

The FME workflow should make it possible to the user to choose the length of the segment. So in my opinion it would be easier to create an entire line first, that could keep the attributes of the first point.

Thanks for helping

 
 

jkr_wrk
Influencer
Forum|alt.badge.img+28
  • May 13, 2024

What you have are ‘Measures’. If you calculate the correct Measure Values: 5.325 - 5.326 etc.

Then you can use these values to set the Measures on the line using the MeasureSetter.

If you then split the line every 50m all lines will have the correct starting and ending position based on the distance of the segment on the line.

The only problem is… I don't understand the MeasureSetter.

But it looks like it works: Use the LineBuilder to create the line. Set it to Generate List with the 5.325 attribute as selected attribute. Then use the MeasureSetter: Whole Line with the generated list as input.

 

But I think when you have more vertexes between two points this needs to be corrected in some other way.

 


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

Okay thank you very much for the help. One question for the input values. I have an Excel file where the Measures are stored as text. Now I want to create a new column where I have these measurements as float, but I don`t find the correct Arithmetic Expression for this. Do you have by chance a plan how I could do that.

Thanks in advance


jkr_wrk
Influencer
Forum|alt.badge.img+28
  • May 14, 2024

It's not necessary most of the time to convert, because FME does it when needed. But sometimes it is.

If you want to force text to float the simple way is @Evaluate(@Value(my_text)*1)

Multiply by 1.

 

But i think if you do @Evaluate(@Value(hmp)+(@Value(distance)/100)) you get what you want?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings