Skip to main content
Solved

Dissolve (or group?) polygons by attribute value?

  • January 20, 2025
  • 2 replies
  • 38 views

andrea_fmswe
Observer
Forum|alt.badge.img+1

Hi! I have tried searching for an answer to this problem with no luck, so i thought i’d try making my first post in this forum!

I am working with a polygon layer containing cities. I want to dissolve all overlappning cities by removing common boundaries and thus create fewer but bigger areas. The issue i have is that i want to sort this dissolving/mergeing by the population-attributute of the cities. In some cases there are  20+  polygons dissolved into one, and i want to make sure that the output polygon inherits the attribute information from the city with the largest population. 

I’ve tried using list-arrays of both population and city-names on the dissolved areas with little success, so i am very unsure of how to proceed. 

 

Does anyone have any tips how to solve this?
Many thanks!

//Andréa

 

 

Best answer by david_r

One way:

  1. Dissolver, configured with list containing the attributes from all the dissolved polygons
  2. ListSorter on list containing population sizes, numeric descending. The first element now contains the attributes from the polygon with the largest population
  3. ListIndexer to retrive index 0 (first element)
  4. AttributeManager to rename as necessary, also to remove the now unnecessary list

 

View original
Did this help you find an answer to your question?

2 replies

david_r
Evangelist
  • Best Answer
  • January 20, 2025

One way:

  1. Dissolver, configured with list containing the attributes from all the dissolved polygons
  2. ListSorter on list containing population sizes, numeric descending. The first element now contains the attributes from the polygon with the largest population
  3. ListIndexer to retrive index 0 (first element)
  4. AttributeManager to rename as necessary, also to remove the now unnecessary list

 


andrea_fmswe
Observer
Forum|alt.badge.img+1
  • Author
  • Observer
  • January 21, 2025

Hi David!

A clear and simple solution, thank you so much!
This was the direction i was going but I have not worked with lists alot so i could not quite get to the solution.

I truly appreciate the help! 

 

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings