Skip to main content

Hello All, 

 

I hope you all are doing well. 

I am trying to figure this out - I have to align points on the lines without overlapping with each other. 

I have used Anchorsnapper(segment snapping..group by line global id). I have passed lines to anchors and points to candidates. The results have some overlapping points (using matcher). To disperse along the line, using sampler and offsetting by 5 ...and still some points are overlapped...so tried to -5 offset the points and then snap to line. I am still ending up with some overlapping points.

 

 

Is there a better way to achieve this?

Any help would be appreciated.

 

Thanks,

Naveen

Hi @naveen what does your original input data (points & lines) look like? Are the points created within FME or outside? Do you need to preserve the order of the points? It’s hard to tell what’s going on without the full picture. 

One alternative method you could implement instead of a Matcher and Sampler is you could use the DuplicateFilter based on the x,y attribute. If you don’t already have the x,y you could extract this with the GeometryExtractor. 

If you’re able to supply some sample data we could help come up with a solution as well! Let us know. 


Hi @evieatsafe 

I have two set of data coming from database. One set is points and the other set is lines. The original three points on the left are snapped to the same location overlapping on each other (on the line).  It chooses the lines based on the line global id that I have specified (This is OK)

The result I am trying to achieve is that all points are distributed along the below selected line without overlapping on each other.

Thanks

 


Hi @naveen what are the parameters you have set in the AnchoredSnapper? 

If you have it set to End Point all of them will snap to the end point and overlap. If you have it set to Vertex it will only snap to the vertices and potentially overlap. If you set it to Segment then it has the least probability of overlapping. If you do not want them to overlap, then I suggest using the Segment Snapping. Hope this helps!


Reply