操作方法

操作方法:在 ArcGIS Pro 的属性表和标注中将数值四舍五入至给定的小数位数

Last Published: July 4, 2024

摘要

When adding raw data containing numbers to ArcGIS Pro, significant figures are preserved to ensure precision when performing data analysis. To present the result, the numbers must be rounded off to a given number of decimal places. This article describes the workflows to round off numbers in an attribute table and label in ArcGIS Pro.

过程

Round off numbers in the attribute table

  1. Open the ArcGIS Pro project.
  2. Open the attribute table.
  3. In the attribute table, right-click the numeric field, and click Fields.
  4. In the Fields view, the numeric field is highlighted. In the Number Format column, double-click Numeric, and click the option The option icon. icon. The Number Format window opens.
The Fields view.
  1. In the Number Format window, select Decimal places for Rounding, and click the Increment or Decrement arrow to set the number of decimal places. In this example, the number is 2. Click OK.
The Number Format window.
  1. On the top ribbon, on the Fields tab, and click the Save The image shows the Save icon. icon.
Note:
The saved changes in the attribute table are not reflected in the label. The numbers in a label must be rounded off in the Label Class settings for the changes to be reflected on the map.

Round off numbers in the feature layer label

  1. On the Contents pane, select the feature layer.
  2. On the top ribbon, under Feature Layer, click the Labeling tab, and click the Enable Labeling The Enable Labeling icon. icon.
  3. In the Label Class group, click the Expression The Expression icon. icon in the Field section. The Label Class - <layer_name> pane opens.
The Labeling tab.
  1. In Label Class - <layer_name> pane, ensure Arcade is selected for Language.
  2. In the Expression text box, delete the existing value.
  3. Under Functions, double-click Round().
  4. Under Fields, double-click the numeric field. In this example, the field is LENGTH. Ensure the field value is inserted in the Round() function.
  5. In the Expression box, next to the field value in the Round() function, type a comma (,) and the number of decimal places. In this example, the number of decimal places is 2.
Round($feature.<field_name>,<decimal_places_number>)
  1. Click the Verify The Verify icon.icon to validate the expression.
  2. Click Apply.
The Label Class window.

The image below shows the numbers in the attribute table and label rounded off to two decimal places.

The numbers rounded off to 2 decimal places in the attribute table and label.

文章 ID: 000025170

接收通知并查找新问题或常见问题的解决方案

从我们全新的 AI 聊天机器人中获得简明答案和视频解决方案。

下载 Esri 支持应用程序

相关信息

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项