1

I have Census areas as polygons and Census population counts as points at a lower geographic level (i.e., there are many points within each polygon). I need to select 1 point from within each polygon with the highest population count (i.e., max value) so that I can export this to a new feature class as a proxy for a population-weighted centroid of each polygon. I am working in ArcGIS Pro.

See below for an example of the type of selection I am looking for (manually selected here).

enter image description here

Is there a way to achieve this in ArcGIS Pro with a Basic license? I have no coding knowledge whatsoever and rely on the tools built into ArcGIS Pro.

2 Answers 2

1
  1. Spatial Join the polygon ids, names, or whatever unique identifier you have to the points to get the unique polygon id as an attribute on all points.
  2. Sort the output points descending by polygon identifier and population to get the points with the largest population per polygon id first in the output.
  3. Delete Identical with your polygon id field as Field.

For every set of identical records, the tool deletes all but the first of the identical records

The first point per polygon will be kept, which is the point with the highest population:

enter image description here

enter image description here

1
  • Thank you for taking the time to help find a solution. This method almost worked; however, the delete identical tool did not keep the first point per polygon after sorting by Polygon ID and Population. This was nevertheless very helpful as I have not used the spatial join tool previously and now understand how this works! Thank you! Commented Jun 28 at 9:16
0

Another way to do it is to use the Calculate Field function on the point layer with an arcade expression to set a field in the point layer to indicate whether the feature should be selected or not e.g. a field called is_max:

//get polygon features in layer "polys1"
var polygons = FeaturesetByName($datastore,"polys1")
//if the current point feature doesn’t intersect a polygon return null
if (First(Intersects(polygons, $feature)) == null)
   { return null }
else
//if the current point feature intersects a polygon
{
//get the polygon this point intersects
    var intersectPoly = First(intersects(polygons,$feature))
    //get all points that intersect this polygon
    var intersectPoints = intersects(FeaturesetByName($datastore,"points1"),intersectPoly)
    //get the max value in field value1 in the filtered feature set.
    var maxValue = Max(intersectPoints,"value1");
    //if the current feature field "value1" is the same as maxValue then set to true else false
    if ($feature.value1 == maxValue)
      return 1
    else
      return 0
}

You can then use the value in field is_max to select those point features that have the highest value in the polygon in which they are located.

enter image description here

There may be a more efficient way of writing the arcade code but this works.

Use a simple select by attribute to select the features where is_max = 1.

1
  • Thank you for taking time to find a solution. This worked perfectly after I substituted i the relevant layer and field names. I am not familiar with using Arcade or Python in Arc but can see this is clearly a skill worth working on and it is very powerful! The result is exactly what I needed and has helped me to identify approximate population centre, particularly in rural areas where the geometric centre of a polygon is rarely the population centre. Thank you! Commented Jun 28 at 9:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.