Skip to main content
Question

Remove duplicates with keeping the line near to center

  • April 25, 2019
  • 2 replies
  • 27 views

a_afiaax
Contributor
Forum|alt.badge.img+2

Hello FME community,

please forgive me if this is a trivial question. I am quite a beginner with FME.

I have a line shapefile containing streets. Each street presented with more than one line (Lines Group) and each lines group belong to the same KEY and NAME as shown in figure one.

The problem is that, for each street I need to keep the line near to center (center of group) and remove other lines as shown in figure two.

 

My initial idea was to create a Bounding Box for each lines group (each street) then creates a Center Point for each Bounding Box. Later on to match each group lines with their center point, and then remove the duplicates with keeping the line near to center.

I am stuck on exactly how I would remove the duplicate with keeping the line near to center? And how I match each group lines with their center point?

For creation of Bounding Box I used (Aggregator Transformer - Group By: key and name >> BoundingBoxReplacer – 2D Oriented) .

For creation of Center Point I used (CenterPointReplacer – mode: center point).

Does anyone have any ideas or other potential solutions?

Regards,

Afia.

@takashi @david_r @jlutherthomas

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • April 25, 2019

Have you looked at the neighbourfinder? This would allow you to identify the line that is closest to the centre point


a_afiaax
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • 9 replies
  • April 29, 2019

Thank you @egomm , Neighbourfinder Transformer is good solution.