Skip to main content

I have two datasets, wherein at some sites i found out visually that there are parallel lines when compared. I need to find these lines that are parallel to the other line in other dataset. Any effiecnt method to do so??

Thanks in advance

Hi @max, if all the line features are single line segments (i.e. having only two nodes - start and end), you can use the AzimuthCalculator from the FME Hub to calculate their azimuth and angle, and then compare them with the ChangeDetector or Matcher (Match Geometry: NONE, Selected Attributes: <azimuth or angle>).

In addition, it might be better that you round the values before comparing to absorb a computational error, using the StringFormatter or AttributeRounder.


another addition: use the neighborfinder if you don't want to compare lines that are to far away from each other


Hi @max, if all the line features are single line segments (i.e. having only two nodes - start and end), you can use the AzimuthCalculator from the FME Hub to calculate their azimuth and angle, and then compare them with the ChangeDetector or Matcher (Match Geometry: NONE, Selected Attributes: <azimuth or angle>).

In addition, it might be better that you round the values before comparing to absorb a computational error, using the StringFormatter or AttributeRounder.

 

@takashi: Unfortunately, I cannot find the AzimuthCalculator in the FME Store anymore nor an angle calculator. Is there something else now?

 


Hi @max, @takashi. added a link to the FME Hub where you can find the AzimuthCalculator

An alternative would be to calculate the azimuth, buffer the lines and spatially test for lines within buffers.

Lines within a buffer should be tested for an equal azimuth value.

Hope this helps.


 

@takashi: Unfortunately, I cannot find the AzimuthCalculator in the FME Store anymore nor an angle calculator. Is there something else now?

 

Hi @tkifuchs, I was able to access the transformer in the FME Hub site. Please try accessing this page: https://hub.safe.com/transformers/azimuthcalculator

 


Reply