Skip to main content
Question

Duplicate Geometries


I have a file that that has a from and to node field but it is bi-directional.  For example,

 

From Node = 1; To Node = 2 and but there is also a record where To Node = 1; From Node = 2. I am using the FeatureMerger to connect the from and to nodes and form a line network; however, this creates duplicate lines (one on top of each other).  Is there a way to eliminate the duplicate lines so there is a unique record for each line geometry?

 

 

Kdmur

3 replies

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • May 17, 2013
Hi,

 

 

How about removing duplicate records before the FeatureMerger?

 

1) Add the third field  (e.g. LineID) which contains a string consist of less node ID and greater node ID. (Tester and  AttributeCreator or StringConcatenator)

 

i.e.

 

From = 1, To = 2 --> LineID = 12

 

From = 2, To = 1 --> LineID = 12

 

2) Remove duplicate LineID records. (DuplicateRemover)

 

 

Hope this helps.

 

 

Takashi

 


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • May 18, 2013
In addition, if you want to remove duplicate lines after connecting the From and To nodes, consider using the Matcher transformer with 'yes' as 'Lenient Geometry Matching' parameter.

 

 

Takashi

  • December 15, 2013
Takashi-san

 

great again, you helped me with this one as well. Both solutions are valid.

 


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