Skip to main content
Solved

LRS dynamic segmentation with offset


tfcw
Participant
Forum|alt.badge.img+1
  • Participant

I'm wondering if it's possible in FME to perform a dynamic segmentation on an LRS event with an offset to the output line geometry.

 

What I mean by this is I'd like the result geometry to be beside the base geometry, parallel to it and a distance away.

 

For example, here's my base LRS geometry, going from 0 to 10 meters.

lrs_base 

Here's the event I'd like to perform the dynamic segmentation on, with a start measure of 0 and and end measure of 5.

dynamic_segmentation_current 

This is what I'd to have. A line going from 0 to 5 meters, located to the left of the base LRS geometry.

dynamic_segmentation_desired 

Is it possible to do something similar to this in FME?

Best answer by drc43

Hi @tfcw​ ,

 

This is possible in FME and actually not that difficult. For the first part, the dynamic segmentation, you'll want to use a Snipper transformer. With this you can select how much of the existing line you want to duplicate, using distance, percentage or a few other options.

Next, if you use a HorizontalAngleCalculator custom transformer from the FME Hub, you can calculate the angle of your line. This will be needed in the next transformer, the Offsetter. Make sure you add 90 degrees to the angle to offset the line perpendicular to the first line. See the images for details. I hope this helps.

snipperlines

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

2 replies

drc43
Contributor
Forum|alt.badge.img+11
  • Contributor
  • Best Answer
  • August 5, 2021

Hi @tfcw​ ,

 

This is possible in FME and actually not that difficult. For the first part, the dynamic segmentation, you'll want to use a Snipper transformer. With this you can select how much of the existing line you want to duplicate, using distance, percentage or a few other options.

Next, if you use a HorizontalAngleCalculator custom transformer from the FME Hub, you can calculate the angle of your line. This will be needed in the next transformer, the Offsetter. Make sure you add 90 degrees to the angle to offset the line perpendicular to the first line. See the images for details. I hope this helps.

snipperlines


tfcw
Participant
Forum|alt.badge.img+1
  • Author
  • Participant
  • August 5, 2021
drc43 wrote:

Hi @tfcw​ ,

 

This is possible in FME and actually not that difficult. For the first part, the dynamic segmentation, you'll want to use a Snipper transformer. With this you can select how much of the existing line you want to duplicate, using distance, percentage or a few other options.

Next, if you use a HorizontalAngleCalculator custom transformer from the FME Hub, you can calculate the angle of your line. This will be needed in the next transformer, the Offsetter. Make sure you add 90 degrees to the angle to offset the line perpendicular to the first line. See the images for details. I hope this helps.

snipperlines

Ah that's perfect thank you! I can't believe I never searched for "Offset" in the transformers


Reply


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