Join Features expressions
The Join Features tool uses ArcGIS Arcade expressions to specify join conditions. In some cases, you may want to specify a condition to select features that should be included in the join. You can perform simple join conditions (such as field a > field c) as well as advanced conditions. The conditions are tested on each feature to determine what is analyzed. Calculations are performed when the analysis runs on ArcGIS GeoAnalytics Server.
At ArcGIS Enterprise 10.6 and later, expressions are formatted using Arcade. In Arcade, field names in Join Features are formatted as $target["field name"] and $join["field name"] or $target.fieldname and $join.fieldname. The first option, $target["field name"] and $join["field name"], is required when a field name includes a space. All examples below use this option.
Note:
Join Features requires two inputs, a target layer and a join layer. Accordingly, any Arcade expression in Join Features must outline the dataset being used. For example, an operation to calculate whether a field in the target layer named field1 is greater than a field in the join layer named field2 would be expressed as $target["field1"] > $join["field2"]. This is different from expressions in other GeoAnalytics Tools, which use the format $feature["fieldname"].
Learn more about Arcade expressions
The following tools use Arcade expressions in GeoAnalytics Server:
Reconstruct Tracks—Buffer expressions.
Create Buffers—Buffer expressions.
Join Features—Join features using start and end expressions.
Calculate Field—Calculate field values.
Legacy:
The ArcGIS GeoAnalytics Server extension is being deprecated in ArcGIS Enterprise. The final release of GeoAnalytics Server was included with ArcGIS Enterprise 11.3. These tools are available through ArcGIS Enterprise 11.3 and earlier versions.
Mathematical operator and function examples
Expressions can mathematically process numbers. The following table shows examples of available operations:
Learn more about mathematical operations and functions in Arcade
|
Operator |
Explanation |
Example |
Result |
|---|---|---|---|
|
|
a plus b. |
|
4.0 |
|
|
a minus b. |
|
1.1 |
|
|
a times b. |
|
4.4 |
|
|
a divided by b. |
|
3.2 |
|
|
Returns the absolute (positive) value of a. |
|
1.5 |
|
|
Returns the natural logarithm (base E) of a. |
|
0 |
|
|
Returns the trigonometric sine of a. The input is assumed to be an angle in radians. |
|
1 |
|
|
Returns the trigonometric cosine of a. The input is assumed to be an angle in radians. |
|
1 |
|
|
Returns the tangent of a. The input is assumed to be an angle in radians. |
|
0 |
|
|
Returns the square root of a. |
|
3 |
|
|
Returns the lowest-valued number between a and b. |
|
-3 |
|
|
Returns the highest-valued number between a and b. |
|
1.5 |
|
|
Returns the input value if it's within the constraining bounds. If the input value is less than the low value, it returns the low value. If the input value is greater than the high value, it returns the high value. |
|
Returns 0 if Returns 6 if |
Multiplication example for a join condition expression using a field from the target dataset.
$target["Distance"] * 2 > $join["DistField"]
Text function examples
Join condition expressions can process text. The following table shows examples of available operations:
Learn more about text functions in Arcade
|
Operator |
Explanation |
Example |
Result |
|---|---|---|---|
|
|
Concatenates values together and returns a string.
|
|
GeoAnalytics is great! |
|
|
Finds a string within a string. Wildcards are not supported.
|
|
2 |
|
|
Makes a string lowercase.
|
|
geoanalytics |
Text example using find and lower.
find(("north"), lower("146NorthStreet")) == False
Date function examples
Join expressions can process dates. The table below shows examples of available operations.
Learn more about date functions in Arcade
In Arcade, month values range from 0 (January) to 11 (December), day values from 1 to 31, hour values from 0 (12:00 a.m.) to 23 (11:00 p.m.), minute and second values from 0 to 59, and millisecond values from 0 to 999. Arcade dates return time values for the GeoAnalytics Server location.
|
Operator |
Explanation |
Example |
Result |
|---|---|---|---|
|
|
Parses a value or set of values into a date string.
|
Example 1: Example 2: Example 3: |
Example 1: 20 Oct 2016 11:23:03 am Example 2: 14 Jan 2017 12:00:00 am Example 3: Returns the current time |
|
|
Subtracts two dates and returns the difference in the specified units.
|
Example 1: Example 2: |
Result will vary depending on when you run this command. Example 1: -20532129137 Example 2: -0.6546783768647119 |
|
|
Returns the year of the given date
|
Example 1:
Example 2: Example 2: |
Example 1: 2017 Example 2: 2012 |
Conditional operators
Conditional statements can use the following operators:
|
Operator |
Explanation |
Example |
Results |
|---|---|---|---|
|
|
a is greater than b a is less than b |
|
False |
|
|
a is greater than or equal to b a is less than or equal to b |
|
True |
|
|
a is not equal to b |
|
True |
|
|
a is equal to b |
|
True |
|
|
Condition 1 or condition 2 is met. |
|
True |
|
|
Condition 1 and condition 2 are met. |
|
False |
Logical operator examples
In addition to the conditional operators, more advanced logical operators, shown in the following table, can be used to join features:
Learn more about logical functions in Arcade
|
Function |
Explanation |
Example |
Result |
|---|---|---|---|
|
|
Returns the input value if it's within the constraining bounds. If the input value is less than the low value, it returns the low value. If the input value is greater than the high value, it returns the high value. |
|
Returns 0 if Returns 6 if |
|
|
Returns one value if a condition evaluates to
|
|
Returns Returns the result of the second |
|
|
Evaluates a series of expressions in order until one evaluates to
|
|
If |
|
|
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.
|
|
Compares equality between the conditional val |