standard Tips for Using the Field Calculator in ArcGIS

Share:

  

The field calculator in ArcGIS is a great tool for manipulating the attributes of a GIS dataset in ArcMap.  With the calculator, manipulations can be done on both numerical and text based fields.  The field calculation can be used for basic tasks like truncating or replacing field values or for running mathematical calculations on multiple fields and placing the results in a new field.  Listed here are some tips and resources for using the field calculator in ArcGIS.  Both VBScript and Python scripting can be used to modify fields using the field calculator.

Pre-written VBScript and Python files can also be loaded into the field calculator window to run processes.  These files have the .cal extension denoting them as calculation files.

Introduction to the Field Calculator

Since Esri offers extensive help documentation for its ArcGIS software, a great resource is its online help documentation.  Start with the Fundamentals of field calculations section for a primer on using the Field Calculator.

Basics of Python Scripting in the Field Calculator

If you’re interested in learning the basics of Python scripting with the field calculator, David Verbeya who presented a Spring 2013 class at the University of Alaska, Fairbanks, has a series of quick videos introducing the basics of using the field calculator with Python scripting.

The six videos in the playlist introduce basic Python concepts and how to use Python scripting to extend the functionality of the Field Calculator.

Calculating the Area of a Polygon

Visit the Calculating Polygon Area in ArcMap page on this site for information about how to use the field calculator to calculate the area of a polygon.

Using the Split Function

The split function allows users to extract character strings from one field and populate another field with the new truncated value.  The SoCalGIS web site has step by step instructions using an example of how to extract just the Tract number from a database of US Census tracts.  More: Field Calculator: I just want the third word

Using the Replace Function

The Providence GIS Solutions site has a step by step tutorial on using the replace function in the Field Calculator to find and replace strings in a text field.  More: Replace Portion of String in Text Field in ArcGIS

Random Number Generator

If you want to randomly generate numbers in a field in ArcGIS, the Teach Me GIS site has a Python script you can download along with instructions on how to use it to generate random numbers in ArcMap.  More: Random Number Generator for the Field Calculator

field-calculator

Field Calculator Help

If you find yourself stuck trying to complete a process using the field calculator, you should seek help from either the Esri ArcGIS Forum or the GIS Stack Exchange page.   Both of these resources offer extensive peer support.


Like this article and want more?

Enter your email to receive the weekly GIS Lounge newsletter:


1 Comment

  1. I HAVE FILED record number for example( 1,3,55,86,7)
    so i need to recalculate the filed or new filed to be 2 digit like
    01
    03
    55
    86
    07

    please help

Comments are closed.