Skip to main content
Question

populating attributes from polygon to polyline using nearest neighbour or spatial relator?

  • February 27, 2020
  • 2 replies
  • 77 views

Hi,

Sorry if this is a super easy question that i have just misinterpreted on how to use the transformers. But i haven't got the accuracy i thought i would, so would love some guidance/help.

 

Basically i have Road network polygons that include an Asset ID field that i need to transfer across to the neighbouring Kerb and Channel Polylines that i have. The polylines contain no attributes that i need to maintain.

The Kerb and Channel polylines (red lines in image below )are within 1m of the road network polygons (cream(ish) polygons in image below) but they in no way ever intersect or are contained within each other at any point.

Conceptually what i want to do is simple, but i just haven't managed to achieve it with either Nearest Neighbour or Spatial Relator. Should i be using a different transformer altogether?

 

Thank you in advance

 

2 replies

ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • February 27, 2020

The tricky bit here is that the ends of lines can be within 1m of multiple polygons as circled in red.

 

From your sample data, I would probably approach this by extracting the line geometry into an attribute with a geometry extractor. Then use a snipper to snip 50% off each line to convert the line to a point, use this as a base in the Neighbour Finder with the polygons as candidates, and merge attributes. Then use a geometry replacer to restore the original line geometry.


Forum|alt.badge.img+2
  • February 28, 2020

@courtknee82 The Matcher had an upgrade in FME 2019 that uses the Frechet distance to match lines that are nearly parallel. I wonder if this would work with your data? The blog Upserts and Dog-Walking gives some background on the new Matcher capabilities.


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