Is there a function I can use to move a vertex on layer A so it overlaps the closest line on layer B.
My situation is I divide a polygon into multiple sections which exist on another layer and sometimes the vertices of some of these sub polygons are off by the slightest of margins. I would like to run a routine to automatically see if the vertices share the same outer boundary and if not then adust the vertices of the sub polygons to align with the overall polygon border on layer A.
And, you want to have the blue polygon, let say, alining with the red polygon to no longer have the overlapping (sliver). The result would be like this:
I isolated the code to show only the geometric part. If you are dealing with some layers with various features in them, you need to write the logic for accomplishing that in a loop etc.