Buffer expressions

The Create Buffers and Reconstruct Tracks tools can apply buffers based on an expression. Buffer expressions can be straightforward, such as = Field1 + 10, or much more complicated.

To learn about the Arcade expressions available in ArcGIS Enterprise 10.6 or later, see Buffer expressions.

Buffer expressions must start with an equal sign (=). The buffer expression is applied to each feature in the dataset, where each feature may have a unique buffer distance. The following table explains the available functions:

Buffer expression functions

Function

Description

as_meters()

Applies a calculation assuming the input values are in meters.

Syntax: as_meters( <value> )

<value> is one of the following:

A numeric field. If there is a space in the field name, use square brackets.

A number.

Examples:

At 10.5, use as_meters(feature['Store dist']); starting at 10.5.1, use as_meters($feature['Store dist'])

as_meters(distance)

as_meters(10)

as_kilometers()

Applies a calculation assuming the input values are in kilometers.

Syntax: as_kilometers( <value> )

<value> is one of the following:

A numeric field. If there is a space in the field name, use square brackets.

A number.

Examples:

At 10.5, use as_kilometers(feature['Store dist']); starting at 10.5.1, use as_kilometers($feature['Store dist'])

as_kilometers(distance)

as_kilometers(10)

as_feet()

Applies a calculation assuming the input values are in feet.

Syntax: as_feet( <value> )

<value> is one of the following:

A numeric field. If there is a space in the field name, use square brackets.

A number.

Examples:

At 10.5, use as_feet(feature['Store dist']) and starting at 10.5.1 use as_feet($feature['Store dist'])

as_feet(distance)

as_feet(10)

as_yards()

Applies a calculation assuming the input values are in yards.

Syntax: as_yards( <value> )

<value> is one of the following:

A numeric field. If there is a space in the field name, use square brackets.

A number.

Examples:

At 10.5, use as_yards(feature['Store dist']); starting at 10.5.1, use as_yards($feature['Store dist'])

as_yards(distance)

as_yards(10)

as_nautical_miles()

Applies a calculation assuming the input values are in nautical miles.

Syntax: as_nautical_miles( <value> )

<value> is one of the following:

A numeric field. If there is a space in the field name, use square brackets.

A number.

Examples:

At 10.5, use as_nautical_miles(feature['Store dist']); starting at 10.5.1, use as_nautical_miles($feature['Store dist'])

as_nautical_miles(distance)

as_nautical_miles(10)

abs()

Returns the absolute (positive) value of the input.

Syntax: abs( <value> )

<value> is one of the following:

A numeric field. If there is a space in the field name, use square brackets.

A number.

Examples:

At 10.5, use abs(feature['Store dist']); starting at 10.5.1, use abs($feature['Store dist'])

abs(distance)

abs(['Store dist'])

abs(10)

log()

Returns the natural logarithm (base E) of the input.

Syntax: log( <value> )

<value> is one of the following:

A numeric field. If there is a space in the field name, use square brackets.

A number.

Examples:

At 10.5, use log(feature['Store dist']); starting at 10.5.1, use log($feature['Store dist'])

log(distance)

log(['Store dist'])

log(10)

sin()

Returns the trigonometric sine of the input value. The input is assumed to be an angle in radians.

Syntax: sin( <value> )

<value> is one of the following:

A numeric field. If there is a space in the field name, use square brackets.

A number.

Examples:

At 10.5, use sin(feature['Store dist']); starting at 10.5.1, use sin($feature['Store dist'])

sin(radValue)

sin(['Sun ang'])

sin(1)

cos()

Returns the trigonometric cosine of the input value. The input is assumed to be an angle in radians.

Syntax: cos( <value> )

<value> is one of the following:

A numeric field. If there is a space in the field name, use square brackets.

A number.

Examples:

At 10.5, use cos(feature['Store dist']); starting at 10.5.1, use cos($feature['Store dist'])

cos(radValue)

cos(['Sun ang'])

cos(1)

tan()

Returns the tangent of the input value. The input is assumed to be an angle in radians.

Syntax: tan( <value> )

<value> is one of the following:

A numeric field. If there is a space in the field name, use square brackets.

A number.

Examples:

At 10.5, use tan(feature['Store dist']); starting at 10.5.1, use tan($feature['Store dist'])

tan(distance)

tan(['Store dist'])

tan(1.2)

sqrt()

Returns the square root of the input value.

Syntax: sqrt( <value> )

<value> is one of the following:

A numeric field. If there is a space in the field name, use square brackets.

A number.

Examples:

At 10.5, use sqrt(feature['Store dist']); starting at 10.5.1, use sqrt($feature['Store dist'])

sqrt(distance)

sqrt(['Store dist'])

sqrt(9)

min(,)

Returns the lowest valued number in the input field.

Syntax: min( <value>, <value> )

<value> is one of the following:

A numeric field. If there is a space in the field name, use square brackets.

A number.

Examples:

At 10.5, use min(feature['Store dist'],feature['MarketDist']); starting at 10.5.1, use min($feature['Store dist'],$feature['Marketdist'])

min(distance, 10)

max(,)

Returns the highest valued number in the input field.

Syntax: max( <value>, <value> )

<value> is one of the following:

A numeric field. If there is a space in the field name, use square brackets.

A number.

Examples:

At 10.5, use max(feature['Store dist'],feature['MarketDist']); starting at 10.5.1, use max($feature['Store dist'],$feature['Marketdist'])

max(distance, 10)

constrain(,,)

Returns the input value if it's within the constraining bounds. If the value is less than the low value, it returns the low value. If the value is greater than the high value, it returns the high value.

Syntax: constrain( <value> , <low> , <high> )

value, low, and high can be the following:

A numeric field. If there is a space in the field name, use square brackets.

A number.

Examples:

Note:

At 10.5, use fields in the format feature['Store dist']; starting at 10.5.1, use fields in the format $feature['Store dist'].

constrain($feature['Store dist'], 6, $feature['distance'])—Returns 6 if Store dist is less than 6, distance if Store dist is greater than distance, and Store dist otherwise.

constrain( distance, 0, 10)—Returns 0 if distance is less than 0, 10 if distance is greater than 10, and distance otherwise.

iff(,,)

Returns one value if a condition evaluates to true, and another value if that condition evaluates to false.

Syntax: iff( <condition>, <true value> , < false value> )

condition is a conditional that is tested for each feature.

true value and false value can be the following:

A numeric field. If there is a space in the field name, use square brackets.

A number.

A function.

Examples:

Note:

At 10.5, use fields in the format feature['Store dist']; starting at 10.5.1, use fields in the format $feature['Store dist'].

iff($feature['field1'] > $feature['field2'], iff($feature['field2'] = 0, $feature['field3'], $feature['field4']), 0)—Returns the result of the second iff function if field1 is greater than field2, and 0 otherwise.

when(,,,...,,)

Evaluates a series of expressions in turn, until one evaluates to true.

The decode function evaluates an expression and compares its value with subsequent parameters. If the expression matches, it returns the next parameter value. If none match, there is the option for the last parameter to be a default return value.