Skip to main content
Solved

Point to line


bayram
Contributor
Forum|alt.badge.img+5

good week everyone

 

There is a yield in point format. I want to produce a line from these points. There is a method I used before, but I did not get very good results. As an attribute, each point has a shooting time. Can I create a line using this shooting time?

Best answer by nielsgerrits

bayram wrote:

Hello Nielsgerrits

 

Thank you very much for your answer. If you are available, could you help me if I send you my file?

 

Happy I could help :)

 

Upon further inspection I found the PreviousRecording class with the tracks. You could split the tracks on segment length (Chopper 2 vertices, LenghtCalclulator, Tester, LineCombiner) or elapsed time between points (AttributeCreator with Adjacent Feature Attributes enabled, calculate DateTimeDiff (@DateTimeDiff(@Value(RecordedAt),@Value(feature[-1].RecordedAt),seconds)) between points, create a new group if elapse time is greater then 10 seconds.

View original
Did this help you find an answer to your question?

5 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

Not sure if I understand what you are after, but I think you have trouble with the order of the records and the line not being build chronologically? I think you first need to reformat the date field (RecordedAt) to fme datetime using the DateTimeConverter, then you will be able to use a Sorter to get the order right and then build the line.

 

For creating a line from points you can use a LineBuilder or a VertexCreator.


bayram
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • September 4, 2023
nielsgerrits wrote:

Not sure if I understand what you are after, but I think you have trouble with the order of the records and the line not being build chronologically? I think you first need to reformat the date field (RecordedAt) to fme datetime using the DateTimeConverter, then you will be able to use a Sorter to get the order right and then build the line.

 

For creating a line from points you can use a LineBuilder or a VertexCreator.

Hello Nielsgerrits

 

Thank you very much for your answer. If you are available, could you help me if I send you my file?

 


nielsgerrits
VIP
Forum|alt.badge.img+54
bayram wrote:

Hello Nielsgerrits

 

Thank you very much for your answer. If you are available, could you help me if I send you my file?

 

Sure :)

 

LineBuilderSample(2021)_1 

LineBuilderSample(2021)_2 


bayram
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • September 4, 2023
bayram wrote:

Hello Nielsgerrits

 

Thank you very much for your answer. If you are available, could you help me if I send you my file?

 

thank you very much it helped a lot with some minor fixes I got a very good result


nielsgerrits
VIP
Forum|alt.badge.img+54
  • Best Answer
  • September 4, 2023
bayram wrote:

Hello Nielsgerrits

 

Thank you very much for your answer. If you are available, could you help me if I send you my file?

 

Happy I could help :)

 

Upon further inspection I found the PreviousRecording class with the tracks. You could split the tracks on segment length (Chopper 2 vertices, LenghtCalclulator, Tester, LineCombiner) or elapsed time between points (AttributeCreator with Adjacent Feature Attributes enabled, calculate DateTimeDiff (@DateTimeDiff(@Value(RecordedAt),@Value(feature[-1].RecordedAt),seconds)) between points, create a new group if elapse time is greater then 10 seconds.


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