HOW TO

Copy a field value from polygon features to the intersecting point features using Arcade in ArcGIS Pro

Last Published: August 18, 2023

Summary

In ArcGIS Pro, point features can spatially relate to other geometries, such as polygon features by overlapping or intersecting one another, and can share attributes. The attribute values of the polygon features can be copied to the intersecting point features for further data analysis, for example, naming the point features intersecting the polygons. However, typing the names can be time-consuming if there are many point features, so an Arcade expression can be used to automate this task, and this article provides the workflow. The map below displays the point features within the polygons.

Point features inside the polygons with the polygons named in the attribute table.

Procedure

  1. In ArcGIS Pro, add a new field to the point feature class.
    1. In the Contents pane, right-click the point feature layer and click Attribute Table.
    2. In the attribute table, click Add Field.
    3. In the Fields view, specify a name for the field in the Field Name column.
    4. Double-click the Alias column of the field and specify an alias for it.
    5. Double-click the Data Type column of the field and select the data type from the drop-down menu. In this example, Text is selected.
Note: 
Ensure the data type selected is compatible with the field type of the polygon features. Refer to ArcGIS Pro: ArcGIS field data types for more information.
The attribute table of the point feature configured.
  1. On the top ribbon, on the Fields tab, click Save.
  1. Add the values into the new field.
    1. In the table view, right-click the new field header and select Calculate Field.
    2. In the Calculate Field window, select Arcade from the Expression Type drop-down list.
    3. Type the following expression in the expression box.
    4. In the first line, replace POLYGON_LAYER with the name of the polygon layer. In this example, Polygon_test layer is used.
    5. In line 9, replace FIELD_NAME with the name of the polygon layer field containing values to be copied. In this example, the Name_field field is used.
var polygons = FeaturesetByName($datastore,"POLYGON_LAYER")

if (First(Intersects(polygons, $feature)) == null)
{ return null }

else
{
    var feat = First(Intersects(polygons, $feature))
    return feat.FIELD_NAME
}
  1. Click Verify.
The Arcade expression configured in the point feature name text box.
  1. When the message, "Expression is valid" is returned, click OK.
The message Expression is valid is returned.

The map below shows the intersecting point features named after the polygons in ArcGIS Pro.

The attribute table of the point features with the name field.

Article ID: 000028664

Software:
  • ArcGIS Pro 3 0
  • ArcGIS Pro 2 8 x
  • ArcGIS Pro 2 7 x
  • ArcGIS Pro 2 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options