Skip to main content

Hi,

 

I have two lines. One original one, and a generalised version of it.

 

Is there a way that I can compare the two so I can see if there are any major spatial differences? I want to look for error locations that I need to fix before I smooth again. For example a deviation of over 0.1m between lines

 

Any help would be great

 

Thanks

 

 

I do this by exploding the lines to points or lines with two vertices using a Chopper and than a ChangeDetector to find the different features.


My initial thought is possibly an AnchoredSnapper with the tolerance set to 0.1m, and Snapping Type set to vertex snapping. After that, feed both sets of lines into a LineOnLineOverlayer which should provide you with an _overlaps attribute on the resulting features. Any feature with _overlaps = 1 would be where the line is farther than 0.1m. But that's just theoretical and would need to be tested.


Thanks for the answers @nielsgerrits​ and @dustin​ .

I think the idea with the anchored snapper would work, though what I ended up doing is I split the original line into vertices (I used the VertexExtractor). Then these points could be the base for a NeighbourFinder. This calculates the shortest distance to the smoothed line. Then I simply used a Tester to isolate anything with a distance over my threshold. I then Buffered a shape around the points so I could find the error point in my original drawing


Reply