Skip to main content
Question

How to find parallel lines and closet line

  • November 1, 2022
  • 3 replies
  • 170 views

gogopotter90
Contributor
Forum|alt.badge.img+13

hello ,

i have lines from data A and Lines from data B

I would like to find the closet lines or parallel lines for Lines A then get the attributes from B to A .

i have used Neighbor finder but i get not always the correct result .

As example at my data , there are also intersection or curves between lines a and lines b , so I got wrong result .

 

I have read that there is Fuzzy parallel line ,but I am not sure if this transformer what I want and how this transformer work .

thanks in advance .

FME 2021

 

3 replies

f.kemminje
Contributor
Forum|alt.badge.img+11
  • Contributor
  • November 2, 2022

Given that there are certain data issues,

I believe you should first cleanup the source data. and stacking them. Keep the valid lines in a single layer or group and just look for a neighbour within that valid set, Hope this helps.


gogopotter90
Contributor
Forum|alt.badge.img+13
  • Author
  • Contributor
  • November 2, 2022
f.kemminje wrote:

Given that there are certain data issues,

I believe you should first cleanup the source data. and stacking them. Keep the valid lines in a single layer or group and just look for a neighbour within that valid set, Hope this helps.

Thanks for ur reply ,but what u mean by keep valid lines in a single layer .which transformer should I use for that and what should I do ?


danminneyatsaf
Safer
Forum|alt.badge.img+12

@gogopotter90​ Another suggestion would be to perhaps use the HorizontalAngleCalculator to find the Azimuth of each line, and then use a TestFilter to group the lines based on the angles that they fall between.

 

For example, the first group could be lines with an angle between 0 and 45, and 180 and 225. Then the second group could be lines with an angle between 45 and 90 and 225 and 270, and so on. You could then use the NeighborFinder on each of these groups.


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