Question

Is there a way to create a boundary around multiple polygons where some of the polygons actually have gaps between them? A little tough to see in the images, but some of the polygons do not touch. I'm just trying to get the black line as the outpu

  • 17 October 2022
  • 7 replies
  • 17 views

image1image2


7 replies

Userlevel 2
Badge +11

Hi @jeffbutlin​ Try the AreaGapAndOverlapCleaner

Userlevel 3
Badge +26

The Snapper transformer may also be useful, with snapping type set to Vertex Snapping and a small tolerance.

Badge +2

@jeffbutlin​ I think starting with Dissolver to first create 3 separate areas. Then, use NeighborFinder with a small distance to identify which areas are close. Then Aggregator

If you attached an example dataset then someone might be able to create a minimal - working - example

Thanks! This worked quite well for my purposes. I used the transformer you recommended, then the dissolver to get what I needed!

@jeffbutlin​ I think starting with Dissolver to first create 3 separate areas. Then, use NeighborFinder with a small distance to identify which areas are close. Then Aggregator

If you attached an example dataset then someone might be able to create a minimal - working - example

Thanks Mark. I ran Dan's suggestion above (AreaGapAndOverlapCleaner) and then the Dissolver and it worked quite well for general zoomed out purposes. The only thing I noticed is that the edges don't create perfect 90 degree angles like I would want them too - see 2nd image below. Any idea how to accomplish that?

I've attached a test dataset.

First image below is an example of the starting data, second image is after I run the AreaGapAndOverlapCleaner. (Then the Dissolver works well for getting rid of the common boundaries - not shown)

imageimage

Badge +2

Thanks Mark. I ran Dan's suggestion above (AreaGapAndOverlapCleaner) and then the Dissolver and it worked quite well for general zoomed out purposes. The only thing I noticed is that the edges don't create perfect 90 degree angles like I would want them too - see 2nd image below. Any idea how to accomplish that?

I've attached a test dataset.

First image below is an example of the starting data, second image is after I run the AreaGapAndOverlapCleaner. (Then the Dissolver works well for getting rid of the common boundaries - not shown)

imageimage

@jeffbutlin​ The AreaGapAndOverlapCleaner will move edges, which is why I wouldn't use it. But if the three areas have to be a single polygon rather than an aggregate (or multi-polygon), that is probably your only choice. But I think I would pass the original areas through the Dissolver first.

Userlevel 2
Badge +11

Thanks Mark. I ran Dan's suggestion above (AreaGapAndOverlapCleaner) and then the Dissolver and it worked quite well for general zoomed out purposes. The only thing I noticed is that the edges don't create perfect 90 degree angles like I would want them too - see 2nd image below. Any idea how to accomplish that?

I've attached a test dataset.

First image below is an example of the starting data, second image is after I run the AreaGapAndOverlapCleaner. (Then the Dissolver works well for getting rid of the common boundaries - not shown)

imageimage

Dissolver->GeometryCoercer->Chopper->LineExtender->Intersector->AreaBuilder->DissolverThe gaps are much narrower than the sides of the polygons so at least for the TEST dataset you could break the polygons into line segments, extend, intersect and then rebuild into a single polygon.

Reply