Skip to main content
replaced http://gis.stackexchange.com/ with https://gis.stackexchange.com/
Source Link

I have a polygon layer of watersheds (N = 1950) for South Africa. Within each watershed is a value (number of people; POPULATION field). I need to find a way to automatically group contiguous watersheds so that when the summed values of a group of watersheds falls between 50 and 100, those watersheds are assigned a unique ID in a new attribute field called GROUP.

The code that I'm looking for would need to run through the entire polygon layer, essentially assigning ID's (i.e., groups) to each watershed in the layer. I'd imagine that in a polygon layer of 1950 watersheds, there would be ~300 unique groups.

Exactly the same question has been posted previously (Clustering polygons by sum of values using ArcPyClustering polygons by sum of values using ArcPy) but unfortunately they never posted their code.

I have a polygon layer of watersheds (N = 1950) for South Africa. Within each watershed is a value (number of people; POPULATION field). I need to find a way to automatically group contiguous watersheds so that when the summed values of a group of watersheds falls between 50 and 100, those watersheds are assigned a unique ID in a new attribute field called GROUP.

The code that I'm looking for would need to run through the entire polygon layer, essentially assigning ID's (i.e., groups) to each watershed in the layer. I'd imagine that in a polygon layer of 1950 watersheds, there would be ~300 unique groups.

Exactly the same question has been posted previously (Clustering polygons by sum of values using ArcPy) but unfortunately they never posted their code.

I have a polygon layer of watersheds (N = 1950) for South Africa. Within each watershed is a value (number of people; POPULATION field). I need to find a way to automatically group contiguous watersheds so that when the summed values of a group of watersheds falls between 50 and 100, those watersheds are assigned a unique ID in a new attribute field called GROUP.

The code that I'm looking for would need to run through the entire polygon layer, essentially assigning ID's (i.e., groups) to each watershed in the layer. I'd imagine that in a polygon layer of 1950 watersheds, there would be ~300 unique groups.

Exactly the same question has been posted previously (Clustering polygons by sum of values using ArcPy) but unfortunately they never posted their code.

Post Closed as "Duplicate" by Chris W, PolyGeo
Corrected spelling and improved question to make it more understandable
Source Link
Ross
  • 141
  • 3

I have a polygon layer of watersheds (N = 1950) for South Africa. Within each watershed is a value (number of people; POPULATION field). I need to find a way to automatically group contiguous watersheds so that when the summed values of a group of watersheds reaches a specific threshold (sayfalls between 50 and 100 people), that group isthose watersheds are assigned a unique codeID in a new attribute field called GROUP.

The code that I'm looking for would need to run through the entire polygon layer, essentially making new 'larger'assigning ID's (i.e., groups) to each watershed in the layer. I'd imageimagine that in a polygon layer of 1950 watersheds, there would be ~300 unique groups.

Exactly the same question has been posted previously (Clustering polygons by sum of values using ArcPy) but unfortunately they never posted their code.

I have a polygon layer of watersheds (N = 1950) for South Africa. Within each watershed is a value (number of people; POPULATION field). I need to find a way to automatically group contiguous watersheds so that when a group of watersheds reaches a specific threshold (say 100 people), that group is assigned a unique code in a new attribute field called GROUP.

The code that I'm looking for would need to run through the entire polygon layer, essentially making new 'larger' groups. I'd image that in a polygon layer of 1950 watersheds, there would be ~300 unique groups.

Exactly the same question has been posted previously (Clustering polygons by sum of values using ArcPy) but unfortunately they never posted their code.

I have a polygon layer of watersheds (N = 1950) for South Africa. Within each watershed is a value (number of people; POPULATION field). I need to find a way to automatically group contiguous watersheds so that when the summed values of a group of watersheds falls between 50 and 100, those watersheds are assigned a unique ID in a new attribute field called GROUP.

The code that I'm looking for would need to run through the entire polygon layer, essentially assigning ID's (i.e., groups) to each watershed in the layer. I'd imagine that in a polygon layer of 1950 watersheds, there would be ~300 unique groups.

Exactly the same question has been posted previously (Clustering polygons by sum of values using ArcPy) but unfortunately they never posted their code.

deleted 56 characters in body; edited tags
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

Good day,

I have a polygon layer of watersheds (N = 1950) for South Africa. Within each watershed is a value (number of people; POPULATION field). I need to find a way to automatically group contiguous watersheds so that when a group of watersheds reaches a specific threshold (say 100 people), that group is assigned a unique code in a new attribute field called GROUP.

The code that I'm looking for would need to run through the entire polygon layer, essentially making new 'larger' groups. I'd image that in a polygon layer of 1950 watersheds, there would be ~300 unique groups.

Exactly the same question has been posted previously (Clustering polygons by sum of values using ArcPy) but unfortunately they never posted their code.

Any help would be greatly appreciated.

Good day,

I have a polygon layer of watersheds (N = 1950) for South Africa. Within each watershed is a value (number of people; POPULATION field). I need to find a way to automatically group contiguous watersheds so that when a group of watersheds reaches a specific threshold (say 100 people), that group is assigned a unique code in a new attribute field called GROUP.

The code that I'm looking for would need to run through the entire polygon layer, essentially making new 'larger' groups. I'd image that in a polygon layer of 1950 watersheds, there would be ~300 unique groups.

Exactly the same question has been posted previously (Clustering polygons by sum of values using ArcPy) but unfortunately they never posted their code.

Any help would be greatly appreciated.

I have a polygon layer of watersheds (N = 1950) for South Africa. Within each watershed is a value (number of people; POPULATION field). I need to find a way to automatically group contiguous watersheds so that when a group of watersheds reaches a specific threshold (say 100 people), that group is assigned a unique code in a new attribute field called GROUP.

The code that I'm looking for would need to run through the entire polygon layer, essentially making new 'larger' groups. I'd image that in a polygon layer of 1950 watersheds, there would be ~300 unique groups.

Exactly the same question has been posted previously (Clustering polygons by sum of values using ArcPy) but unfortunately they never posted their code.

Source Link
Ross
  • 141
  • 3
Loading