方法

ArcGIS Pro で複数の属性フィールドの個別値をグループ化する

Last Published: August 8, 2023

サマリー

In some instances, unique values from multiple attribute fields are customized to form groups that display only certain attributes on the map.

In the image below, the locations of various orchids are symbolized by species, and by whether they are common or threatened. If the dataset is not customized, all the attributes are scattered and symbolized individually on the map.

Unique values symbology of selected fields
 

In this example, the locations of Butterfly orchids where it is common and threatened are emphasized. To do this, the selected attributes are grouped and symbolized using the Arcade expression.

手順

Below are the steps to use Arcade to group unique values from multiple attribute fields in ArcGIS Pro.

  1. In ArcGIS Pro, open the Symbology pane for the layer. Right-click the layer and select Symbology.
  2. In the Symbology pane, select Unique values.
  3. In the Value field, set an Arcade expression by clicking the Set an expression icon.

    Symbology pane showing the set an expression icon
     
  4. In the Expression Builder dialog box, set Language as Arcade, and type the expression in the Expression box. Click Verify to validate the expression, and click OK to execute the expression.
The following is the Arcade expression used to configure the unique values of multiple attribute fields from a single dataset. The Name field is evaluated first. If the Name field is Butterfly and the Status is Common, the unique value Group 1 is returned. If the Name field is Butterfly and the Status field is Threatened, a second unique value, Group 2 is returned. The expression creates the Group 3 unique value for all other features not included in Group 1 or Group 2.
var name = $feature.Name
var status = $feature.Status

if (name == "Butterfly") {
if (Status == "Common") {
  
     return "Group 1" }
}

if (name == "Butterfly") { 
if (Status == "Threatened") { 

     return "Group 2"}
}

else { 

     return "Group 3" }
Note:
Repeat the 'if' or 'else if' statement in the expression if it is necessary to configure more fields for the unique values.
Expression Builder
  1. In the Symbology pane, set other properties for the unique values such as the color or outline for each symbol. For more information, refer to the web help page: Vary unique value symbology by transparency, rotation, size, or color.

    Set color scheme, outline, etc. in the Symbology pane
The image below shows the groups of unique values customized according to the steps above. Now, the location of Butterfly orchids where it is common and threatened are emphasized.

The location of Butterfly orchids where it is common and threatened are symbolized

記事 ID: 000017852

新しい問題や一般的な問題に対する通知とソリューションの受け取り

新しい AI チャットボットから、要約された回答とビデオソリューションを入手してください。

Esri Support アプリのダウンロード

関連情報

このトピックについてさらに調べる

ArcGIS エキスパートのサポートを受ける

テクニカル サポートへのお問い合わせ

Esri Support アプリのダウンロード

ダウンロード オプションに移動