Comments and answers for "Extract line segments between two points" https://knowledge.safe.com/questions/22456/extract-line-segments-between-two-points.html The latest comments and answers for the question "Extract line segments between two points" Comment by goatboy on goatboy's comment https://knowledge.safe.com/comments/54432/view.html Many Thanks @takashi this method works for me doing a similar process to the original question. Best regards Steve

Sat, 30 Sep 2017 22:09:14 GMT goatboy
Comment by jeroenstiers on jeroenstiers's comment https://knowledge.safe.com/comments/22469/view.html

I was working in build 15250 and it didn't work. In build 15482 it does.

Thank you!

Thu, 21 Jan 2016 13:15:24 GMT jeroenstiers
Comment by takashi on takashi's comment https://knowledge.safe.com/comments/22467/view.html

The ability to set measure to points of the PointOnLineOverlayer is relatively new (maybe FME 2015.1+?). Which version of FME are you using?.

Thu, 21 Jan 2016 12:52:04 GMT takashi
Comment by takashi on takashi's answer https://knowledge.safe.com/comments/22466/view.html

Completely different approach flashed. Assuming that each line can be split into three parts by a pair of two points representing a section, the middle part is the required one.

1. Once connect the three parts with the LineJoiner.

  • Group By: <line ID attribute>
  • Preserve Original Orientation: yes
  • List Name: _list
  • Preserve Lines as Path Segments: Yes

2. Split the resulting line (path) into three parts again, with the PathSplitter.

  • Segment Number Attribute: _segment_number
  • List Attribute: _list{}

The segment having 1 as "_segment_number" is the middle segment.

Thu, 21 Jan 2016 12:39:11 GMT takashi
Comment by jeroenstiers on jeroenstiers's answer https://knowledge.亚搏在线safe.com/comments/22465/view.html

I implemented this method to find out how it works but I cannot find out what should happen with the MeasureExtractor:2 in combination with the StatisticsCalculator since the attribute '_point_measure' is empty when testing with my testdata.

Could you confirm if the result of the MeasureExtractor:2 should be the following?
For every point, the _point_measure should be the location of this point on the line. By calculating the mean of these two values, you make sure the result is a value between those two locations. That is why you can use this information in the Tester. Is this correct?

Thu, 21 Jan 2016 12:28:04 GMT jeroenstiers
Comment by jeroenstiers on jeroenstiers's answer https://knowledge.safe.com/comments/22464/view.html

The segmentID used in the FeatureMerger is created in the Counter.

Thu, 21 Jan 2016 11:57:30 GMT jeroenstiers
Answer by jeroenstiers https://knowledge.safe.com/answers/22462/view.html

Hi mkov,

I found a method that works for 2 points and 1 road. So it should work for the road with ID 2 and also for one segment for the road with ID 1.

I tried this using created a sample. Can you try this method on your data to see if it works?

I am not entirely sure the 'select only 1 segment'-part is the most efficient one but it works :)

FME Inspector:

FME Workbench:

Thu, 21 Jan 2016 11:54:09 GMT jeroenstiers
Comment by takashi on takashi's answer https://knowledge.safe.com/comments/22461/view.html

Because the PointOnLineOverlayer doesn't snap the end nodes of split lines to the input points, the output lines and points may not construct a network topology.

Thu, 21 Jan 2016 11:45:42 GMT takashi
Answer by takashi https://knowledge.safe.com/answers/22460/view.html

If each line can be spatially related to just 2 points (start point and end point belonging to the same section), this data flow might work.

Thu, 21 Jan 2016 11:40:51 GMT takashi
Answer by mkov https://knowledge.safe.com/answers/22459/view.html

@jeroenstiers I haven't been able to get the point on line overlayer to work correctly. I'm not sure what I'm missing.

Thu, 21 Jan 2016 11:31:48 GMT mkov