Formula Calculator

Attribute calculation may be done through the Global Mapper interface, by selecting Calculate/ Copy Attribute Values from the Layer Menu. The tool can calculate a new attribute value (or update the value for an existing attribute) for features in a layer based on a formula. That formula may use other attributes as operands.

In scripting, the formula calculator is used by the CALC_ATTR_FORMULA command and the DEFINE_VAR command. It allows you to calculate a new value (or update an existing value) based on a formula. In the case of CALC_ATTR_FORMULA, the calculator allows you to calculate new attribute values based on a feature's attributes. In the case of DEFINE_VAR, the calculator allows you to calculate new script variable values. Formulas may combine numbers and strings and either feature attribute references or script variable references. A number of functions are provided to operate on these values.

Many features of the formula calculator are identical when used in the two applications; where different, the difference will be noted below.

Formula reference

Formulas are expressions that can combine strings, numbers and attributes to form a new value. The formula language also includes a number of functions that may be called to manipulate formula values.