Skip to main content
Question

How to create perpendicular lines and points from a line file


FME_Perpendicular_Line_and_Point_Drawing_CopyHello, I have a line file that I need to divide into 5 mile sections. At each 5 mile point, I need to create a perpendicular line off to the left side of the line. I need this line to be certain lengths or be able to divide the line into sections afterwards. I need to then export the coordinates of each vertex along the perpendicular line. Please see my drawing what I'm looking to create. I need the coordinates of each location where there is a home placed on the drawing. Thanks!

 

 

9 replies

jkr_wrk
Influencer
Forum|alt.badge.img+28
  • April 4, 2022

And what did you try?

 

Typing out your complete homework  assignments on FME forum?


Forum|alt.badge.img+2

@bimbe​ Try using the 2DVectorCalculator from the FME HUB. You'll have to have two vectors for either side of the line then LineCombiner to join them into a single line.


  • Author
  • April 4, 2022
jkr_da wrote:

And what did you try?

 

Typing out your complete homework  assignments on FME forum?

5_Mile_Test" data-fileid="0694Q00000HYwabQADSo far, I've taken a DistanceChopper to divide the initial line file up into 5 mile sections --> then a counter --> CoordinateExtractor --> and then a rotator. This get's me what I'm looking for but I need the lines to be straight coming off the line file (see below). I've also tried some sort of combination between OffsetCurveGenerator, DistanceMarker, BoundSplitter, and a few other transformers I've found from searching the community but nothing specifically what I'm looking for. Business user came to us with this request but it's got our team stumped right now.


jkr_wrk
Influencer
Forum|alt.badge.img+28
  • April 4, 2022
bimbe wrote:

5_Mile_Test" data-fileid="0694Q00000HYwabQADSo far, I've taken a DistanceChopper to divide the initial line file up into 5 mile sections --> then a counter --> CoordinateExtractor --> and then a rotator. This get's me what I'm looking for but I need the lines to be straight coming off the line file (see below). I've also tried some sort of combination between OffsetCurveGenerator, DistanceMarker, BoundSplitter, and a few other transformers I've found from searching the community but nothing specifically what I'm looking for. Business user came to us with this request but it's got our team stumped right now.

According to your image you don't offset perpendicular, but rather in north-west direction?

 

A perpendicular offset on a line with these kind of bends will go in all directions.

 

If the lines all should go in the same direction you could extract the vertices, clone+offset the vertices in the correct direction and then create lines from original to new vertex.

 

You then can snip the lines to the correct distance?

 

If the lines should be perpendicular the OffsetCurveGenerator should do the job I think.


jkr_wrk
Influencer
Forum|alt.badge.img+28
  • April 4, 2022
bimbe wrote:

5_Mile_Test" data-fileid="0694Q00000HYwabQADSo far, I've taken a DistanceChopper to divide the initial line file up into 5 mile sections --> then a counter --> CoordinateExtractor --> and then a rotator. This get's me what I'm looking for but I need the lines to be straight coming off the line file (see below). I've also tried some sort of combination between OffsetCurveGenerator, DistanceMarker, BoundSplitter, and a few other transformers I've found from searching the community but nothing specifically what I'm looking for. Business user came to us with this request but it's got our team stumped right now.

I ones made a workbench that did a similar result:

In this case a line on the top of a dune, and then extend perpendicular in both directions every 20m. This way you can check the height profile of the dune on fixed locations. But as you can see, the lines intersect when the dune curves.image


  • Author
  • April 4, 2022
bimbe wrote:

5_Mile_Test" data-fileid="0694Q00000HYwabQADSo far, I've taken a DistanceChopper to divide the initial line file up into 5 mile sections --> then a counter --> CoordinateExtractor --> and then a rotator. This get's me what I'm looking for but I need the lines to be straight coming off the line file (see below). I've also tried some sort of combination between OffsetCurveGenerator, DistanceMarker, BoundSplitter, and a few other transformers I've found from searching the community but nothing specifically what I'm looking for. Business user came to us with this request but it's got our team stumped right now.

That's pretty similar to what I'm looking for in your example of the dunes. In my case it's a coastline along with east coast of the US. I know it won't be exactly perpendicular but i thought it would be close to what I was looking for. I'll try a combination of the Offsetter and/or OffsetCurveGenerator. Thanks


ctredinnick
Supporter
Forum|alt.badge.img+18
  • Supporter
  • April 4, 2022

Something like this works:

imageimageThe key is getting the angle of the coastline, then offsetting points along that coastline by that angle plus (or minus) 90 degrees. You'll need some way of knowing which side to offset to (test if in sea or land). Also the way I've done it the points touch two coastline segments, so it has two angles available and I'm only using one, but that's also a simple improvement to put in to average it.


  • November 9, 2022
ctredinnick wrote:

Something like this works:

imageimageThe key is getting the angle of the coastline, then offsetting points along that coastline by that angle plus (or minus) 90 degrees. You'll need some way of knowing which side to offset to (test if in sea or land). Also the way I've done it the points touch two coastline segments, so it has two angles available and I'm only using one, but that's also a simple improvement to put in to average it.

Can you share the script? Or detail the parameters you used?


ctredinnick
Supporter
Forum|alt.badge.img+18
  • Supporter
  • November 9, 2022
barzo wrote:

Can you share the script? Or detail the parameters you used?

Sure, it's attached.


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