Skip to main content

Hi,

I would like to merge a cluster of polygons up to a maximum size. For example I have 1000 polygons and I would like to merge each with their neighbours up to a maximum size of 72,000,000m2. Is this possible?

Thanks

B

Hi @bjudes​ ,

 

interesting question! What do you mean by "neighbours"? Maybe adjacent?


Hi @bjudes​ ,

 

interesting question! What do you mean by "neighbours"? Maybe adjacent?

Hi @davtorgh​, yes I meant adjacent by neighbours. Thanks for the reply.


Hi @davtorgh​, yes I meant adjacent by neighbours. Thanks for the reply.

Hi @bjudes​ ,

 

the key transformer to merge adjacent polygons is the Dissolver. The first (simple) step is to send all your polygon features throght the Dissolver, calculate the area of each resulting polygon and test it against a threshold. The attached workspace does exactly this, processes 12 polygon features (see the image) and produces 5 polygon features. If, for example, we set a a threshold at 25.000sm, 3 features pass the test and can go to final outèut, but 2 does not (corresponding source features are 4,5 and 6,7,8.

 

screenshot

 

Now the problem gets quite complicate. What should we do with these 2 features?

  • should features 4 and 5 go to final output individually?
  • should we try to merge feature 6 and 7, check the area against the threshold and, eventually, go back and retry by merging feature 6 and 8?

 

There may be other question, but the essence is that it's about performing a loop, which is a bit complicated to do. Maybe there are other solutions, but I can't think of them now.

 

Anayway, hope that helps!


Reply