Question

How to find parallel lines and closet line

  • 1 November 2022
  • 3 replies
  • 24 views

Badge +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

Badge +3

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.

Badge +13

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 ?

Userlevel 2
Badge +10

@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.

Reply