I have two polyline datasets. One is a topoligically/spatially correct road centerline (red in the image below "new"), the other is a spatially inaccurate but properly attributed road centerline (yellow - "old"). I want to get the attributes into the spatially accurate one.

I am just learning FME and would like to do it using that. enter image description here

It's basically a spatial join but with a tolerance of up to about 5m . I see that there are options for point datasets (Spatial join using FME) but I can't seem to find anything for polylines.

I found a solution based on arcmap but I prefer to use FME in this case. See Merging and joining two line feature classes while maintaining attributes from both using ArcGIS for Desktop?

There's the following but it also dealing with a point dataset (FME - Is there a transformer to snap point on point of nearest line?)

Do I need to buffer the new dataset and then join the attributes of anything within the buffer and then convert this back into a line? or do I need to convert line to point and then run the above-suggested processes? or is there some simpler fme model process I can apply?

==== Based on @buddiebubba response I had the issue that he and @Mark Ireland said would happen.

I am not sure what attributes to use in the following enter image description here

=== with the Azimuth Calc I don't get any matches... enter image description here

See https://drive.google.com/file/d/0B1XGDTNNfbMJZXZOZWRKa2lwMG8/view?usp=sharing for the fmw

=== I also tried the following which ends up with pretty much the same result. enter image description here

See https://drive.google.com/file/d/0B1XGDTNNfbMJXzBKaDNWZldxNGM/view?usp=sharing for the fmw

=== the fmw works but there's still a lot of mismatch... enter image description here

The sample data is in https://drive.google.com/open?id=0B1XGDTNNfbMJVzI1TUdEOFg2Yzg

  • Are your datasets in the same coordinate system? If not, you'll need to reproject one to match the other. Also, can we see a screenshot of your NeighborFinder transformer?
    – Fezter
    Jun 20, 2016 at 5:22
  • @Fezter yes they are in same coord sys. I have added links to the fmw files and another process I tried.
    – GeorgeC
    Jun 20, 2016 at 7:24

2 Answers 2


NeighborFinder will do what you need. New = base, old = candidate. Parameters: 1 candidate to find, distance 5m. The only challenge is to prevent matching the wrong candidate at intersections. Snipping off first and last point of both the base & candidate features should do the job.

======= update 20160620 As Mark suggested adding the AzimuthCalculator should solve the wrong match problem. You need to calculate the overall bearings from both sets, find the matching lines with the NeighborFinder and then test the result based on the difference between the bearings from the matched lines. See added screenshot.

enter image description here You need to iterate what variables for Distance (NeighborFinder) and difference in bearing (Tester) works the best for your data.


Yes, the NeighborFinder transformer finds the closest 'candidate' to each 'base'.

Additionally, I would try a custom transformer we have called the PolylineAnalyzer. This transformer will tell you the overall bearing of each feature. If the bearing of the features you are matching are not within (say) 5 to 10 degrees of each other then it's likely to be the wrong match.

For example, in your screenshot the vertical yellow line is closer to the horizontal red, rather than the vertical red:

enter image description here

NeighborFinder by itself could produce the wrong result, but the bearings would be closer to 90 degrees different, highlighting that potential issue.

  • -you were right the angles do matter. So I tried the Polyline Analyzer but I am not sure what values to use in here. I have attached an image to the orginal question.
    – GeorgeC
    Jun 14, 2016 at 4:24
  • @GeorgeC segment angle needs to be with 5-10 use a tester to find poor angles for between your polylines. >10 or <5 can be used.
    – Mapperz
    Jun 15, 2016 at 0:13
  • 1
    OK. My bad. I think what you need is the AzimuthCalculator transformer (which is a component of the PolylineAnalyzer, which is why I got confused). Sorry. If you just place an AzimuthCalculator then there are no parameters and it will return the values you need. Jun 15, 2016 at 14:25
  • @MarkIreland thanks, I added this but now I get no matched segments.
    – GeorgeC
    Jun 20, 2016 at 5:01
  • 1
    @GeorgeC I updated my answer with the suggestion from Mark. Jun 20, 2016 at 7:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.