Question

Align Polygons feature to targeted line feature only .

  • 15 June 2020
  • 4 replies
  • 14 views

Badge +1

Hello FME users,

I have two layers

1. Area Polygon

2. Line

Requirement Polygon (Blue) need to align to the Line (Red) . Tried “AnchoredSnapper" could not work can any one help me out how can this be accomplish?

 


4 replies

Userlevel 5
Badge +25

AnchoredSnapper with a higher tolerance, it should at least be that distance that you see there, preferably a bit more. But that still leaves you with the problem that if there's a case where the area differs just a little bit more than your tolerance it won't snap.

Another option, thinking out loud here:

  1. Intersector
  2. AreaBuilder & Dissolver
  3. Clip with the original areas
  4. Dissolve any outside results that touch the original area (SpatialFilter) with the original area.
Badge +1

AnchoredSnapper with a higher tolerance, it should at least be that distance that you see there, preferably a bit more. But that still leaves you with the problem that if there's a case where the area differs just a little bit more than your tolerance it won't snap.

Another option, thinking out loud here:

  1. Intersector
  2. AreaBuilder & Dissolver
  3. Clip with the original areas
  4. Dissolve any outside results that touch the original area (SpatialFilter) with the original area.

@redgeographic Thanks for your quick feedback. actually tried that way. we don't have only one polygon we have multiples adjacent as well so would we able to just clip and dissolve any another solution ?

Userlevel 5
Badge +25

@redgeographic Thanks for your quick feedback. actually tried that way. we don't have only one polygon we have multiples adjacent as well so would we able to just clip and dissolve any another solution ?

I think in that case only the AnchoredSnapper with a higher tolerance, possibly add a Densifier on the lines before snapping, although setting it to segment snapping should make that unnecessary.

Userlevel 1
Badge +21

Unsure without real data to test it on but how about sending both polygons and lines to a topology calculator, finding any lines with the same start and end point (may need some extra work to account for direction), only keep the line with the shortest length and then rebuild the polygon using the shorter line

Reply