Skip to main content

Hello,

 

what would be the proper way to filter out duplicate lines. For example, I have 2 completely overlapping lines with different line directions and I can't just use DuplicateFilter because the geometry of those lines are different so in fact they are not duplicate... I noticed that if I put GeometryExtractor before duplicate filter and set the Geometry encoding to 'GEO (Microformat)' - also works with some other formats - than it seems it looses the info about line direction and DuplicateFilter detects those 2 lines as duplicate lines. So, at the end, my workbench works but I'm afraid that this is some weak workaround that will fail in some sitauations... or?

Have a look at the Matcher transformer. You probably want to have lenient matching ON and it may also be necessary to play around with different values for the vector tolerance (= ground units).


@david_r​ 

Thank you for your help. Till now I didn't know about lenient matching parameter - good to know, thanks. But it seems it doesn't work with lines that have different directions. I believe it works only for cases as described in documentation: "For example, consider two lines, each with 10 vertices: One line is a path composed of 3 segments, and the other is just a simple line. These lines are considered to have a different composition. Lenient geometry matching will treat all these as matching, as long as they have the same vertices (no more and no less)."


@david_r​ 

Thank you for your help. Till now I didn't know about lenient matching parameter - good to know, thanks. But it seems it doesn't work with lines that have different directions. I believe it works only for cases as described in documentation: "For example, consider two lines, each with 10 vertices: One line is a path composed of 3 segments, and the other is just a simple line. These lines are considered to have a different composition. Lenient geometry matching will treat all these as matching, as long as they have the same vertices (no more and no less)."

Lenient geometry matching should, as far as I can remember, work with differing orientations. Did you test?

If you have complex paths, it can sometimes help to pass them through the GeometryRefiner first.


I tested it with fresh dwg file (only 2 lines with 2 vertices and different directions). Tolerance should be 0 (or at least super small) but I also increased the tolerance step by step and reached 1000 (line lengths are around 500m). I'm attaching it here. Maybe I'm doing something wrong. I see documentation also says: "then the order of points in line and area features will be ignored"...


I tested it with fresh dwg file (only 2 lines with 2 vertices and different directions). Tolerance should be 0 (or at least super small) but I also increased the tolerance step by step and reached 1000 (line lengths are around 500m). I'm attaching it here. Maybe I'm doing something wrong. I see documentation also says: "then the order of points in line and area features will be ignored"...

The features aren't matching because you have extracted the geometry and set that as to match as an attribute. If you uncheck the match attributes, your features will match


Thank you very much! Now it works.


Reply