Skip to main content

Hello,

I have received a list of vertices/points of different lines in a CSV-File from our client. The CSV-File has the same structur like the following image:

 

CSV_StructurCreating the respective lines is not the problem (VertexCreator -> LineBuilder (GROUPBY "row1"). In addition to the complete line with all its vertices, I would also like to create all the individual line segments between the individual vertices as lines. Now there is the possibility to achieve this with the chopper, but after segmenting the line into its individual segments I would have to attach all attributes from the second column of the CSV file (start -> end point) to the line segment again by means of a spatial selection. I would like to avoid this. Is there an elegant way to do this in FME?

 

Thanks a lot

If when you use the LineBuilder you create a list, you can then use a counter after the chopper and use the count attribute to access the relevant element of the list. You'll need to decide how to handle the fact you will have e.g. 4 line segments but 5 values in column2

Capture


On the LineBuilder you can generate a list of the column two values. Though I am not sure how you want to assign them to an individual segment. Do you want just the start value, then end value, both, all?


Thanks a lot for your fast support, which helps me to find a way to get my line segments. In the end, I implemented it a little differently, but the content is the same. Since I knew that my points were already in the right order in the table, I could use the option "Enable Adjacent Feature Attributes" in the AttributeCreator. I used the following settings to get to the attributes of the next point.

Bild1My whole section for generating the line segments ends up looking like this.

Bild2


Reply