You can create lines from the input points, where the second point gets the coordinates of the next feature.
You can realise this by first adding the coordinates of the next feature to a point (using an AttributeManager with 'Enable Adjacent Feature Attributes'), and then adding a vertex to the point, using these coordinates, thus creating a line.
in the attached workspace the CSV file contains attributes called X and Y, which FME 'automagically' recognises as coordinates. And of course the last point has to be treated different, as it has no next feature.
Does your CSV data have a field that indicates which points belong to which lines? (ie. Line1, Line2, etc.) If so, you can Group By this field in the LineBuilder, and it will output separate lines.
https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Transformers/Transformers/linebuilder.htm?Highlight=linebuilder
You can create lines from the input points, where the second point gets the coordinates of the next feature.
You can realise this by first adding the coordinates of the next feature to a point (using an AttributeManager with 'Enable Adjacent Feature Attributes'), and then adding a vertex to the point, using these coordinates, thus creating a line.
in the attached workspace the CSV file contains attributes called X and Y, which FME 'automagically' recognises as coordinates. And of course the last point has to be treated different, as it has no next feature.
image 2 above.
I have this data set as shown in image1.
& after transformation I am getting this image2.
image 3 FME work bench.
Can u help me in this.
image1
You can create lines from the input points, where the second point gets the coordinates of the next feature.
You can realise this by first adding the coordinates of the next feature to a point (using an AttributeManager with 'Enable Adjacent Feature Attributes'), and then adding a vertex to the point, using these coordinates, thus creating a line.
in the attached workspace the CSV file contains attributes called X and Y, which FME 'automagically' recognises as coordinates. And of course the last point has to be treated different, as it has no next feature.
Passing your (visible) point data through a modified version of my workspace (see attachment) I get the following results:
Passing your (visible) point data through a modified version of my workspace (see attachment) I get the following results:
Thanks this works 😊 .
I was just trying it in different way like adding a counter to it & giving it a unique id to it & then passing it through the vertex creator (Mode ->Replace with Points) then create a line from with their specified ids but I am ending up 1st attribute to all other.
Does your CSV data have a field that indicates which points belong to which lines? (ie. Line1, Line2, etc.) If so, you can Group By this field in the LineBuilder, and it will output separate lines.
https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Transformers/Transformers/linebuilder.htm?Highlight=linebuilder
I have used counter to generate unique ids to it & then pass it through vertex creator & in line builder when ever I use Group By this field I wont get any output.
Does your CSV data have a field that indicates which points belong to which lines? (ie. Line1, Line2, etc.) If so, you can Group By this field in the LineBuilder, and it will output separate lines.
https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Transformers/Transformers/linebuilder.htm?Highlight=linebuilder
A solution using 2 LineBuilders in parallel with GroupBy:
A solution using 2 LineBuilders in parallel with GroupBy:
Now I have above work flow & no I want to connect all the points I have tried with Line Builder I getting single output. Can you please me in this
A solution using 2 LineBuilders in parallel with GroupBy:
Add the steps from either of my workspaces (VertexCreator in Add Point mode, or LineBuilder, in both cases using appropriate attributes you have created before) and you will get line objects between two adjacent points.
And undoubtedly there are other ways to create the line objects. Try and learn!
Passing your (visible) point data through a modified version of my workspace (see attachment) I get the following results:
Hi @geomancer I was having doubt in Point2Line_v2.
how you have created line between two pts without using the any line builder transformer?
Passing your (visible) point data through a modified version of my workspace (see attachment) I get the following results:
Hi @rohan98 , the VertexCreator changes point features into line features when in Add Point mode.
To make this work, I first added to each feature the coordinates of the next feature as attributes in the AttributeManager, by utilizing the Enable Adjacent Feature Attributes setting, looking forward to the next ('subsequent') feature.