Instrução

Arredondar os números para um determinado número de casas decimais em uma tabela de atributos e rótulo no ArcGIS Pro

Last Published: July 4, 2024

Resumo

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.

Procedimento

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 do Artigo: 000025170

Receba notificações e encontre soluções para problemas novos ou comuns

Obtenha respostas resumidas e soluções de vídeo do nosso novo chatbot de IA.

Baixe o Aplicativo de Suporte da Esri

Informações Relacionadas

Descubra mais sobre este tema

Obtenha ajuda de especialistas do ArcGIS

Entre em contato com Suporte Técnico

Baixe o Aplicativo de Suporte da Esri

Ir para as opções de download