Join Features

Join Features tool icon The Join Features tool transfers attributes from one layer or table to another based on spatial, temporal, and attribute relationships, or some combination of the three. Optionally, statistics can be calculated for the joined features.

Workflow diagram

Join Features workflow diagram

Examples

  • An analyst has data on crime incidents in their city. To analyze and study the impact of these crimes, it is necessary to understand the relationship that the crime locations have with various city jurisdictions such as school districts, police beats, and neighborhoods. By using the Join Features tool, additional information about each location can be appended to each crime and the impact on various jurisdictions can be further studied and analyzed.

Usage notes

  • When joining features, you can join features based on a spatial relationship, a temporal relationship, an attribute relationship, or a combination of the three.

    OptionsDescription
    Spatial icon

    Spatial relationship

    The spatial relationship that will determine if features are joined to each other. The available relationships depend on the geometry type (point, line, or area) of the layers being joined. Available spatial relationships include:

    • intersects
    • equals
    • near planar
    • near geodesic
    • contains
    • within
    • touches
    • crosses
    • overlaps
    Temporal icon

    Temporal relationship

    The temporal relationship that will determine if features are joined to each other. The available relationships depend on the time type (instant or interval) of the layers being joined. Available temporal relationships include:

    • meets
    • met by
    • overlaps
    • overlapped by
    • during
    • contains
    • equals
    • finishes
    • finished by
    • starts
    • started by
    • intersects
    • near
    Attribute icon

    Attribute relationship

    The attribute relationship that will determine if features are joined to each other. Features are matched when the field values in the join layer are equal to field values in the target layer.

  • If multiple features match with the same target feature, you can determine if all the matching features will be joined (Join one to many) or if all the matching features will be summarized together (Join one to one) as follows:
    • Join one to one—This option summarizes all of the matching join features to each feature in the target layer. Only the target features that have a match will be included in the output. The count of joined features will be added, in addition to other statistics such as sum, minimum, maximum, range, mean, variance, and standard deviation. Real-time analytics support one to one joins only.

      Summary statistics can only be calculated if a Join one to one operation is specified.

    • Join one to many—This option joins all the matching features in the join layer to the target layer. The result layer will contain multiple records of the target feature. Big data analytics support both one to one and one to many joins.

      Join features one to one and one to many

      Examples of a one-to-many and one-to-one join. In this example, the one-to-one join only includes the count; additional statistics that can be calculated are shown below in How Join Features works - Calculations.

      When the Join Operation parameter is set to Join one to many, there can be more than one row in the output feature class for each target feature.

  • When configuring the Join Features tool in a one-to-one join, you can decide to only retain features that are joined or retain all features regardless of join results
    • If only retaining features that are joined, features will only be present in the output that were able to successfully join with a feature from the join dataset
    • If retaining all features regardless of join results, all features from the target dataset will be present in the output, regardless of whether or not there were any joined attributes
    • When retaining all features, if a feature is retained but there was no join for that feature, the COUNT value will be 0, and any summary field attribute values will be null
    • This option is only available for one-to-one joins and is not available for one-to-many joins
  • If target and join features are in different coordinate systems, the coordinate systems of the target feature will be used.
  • If a join feature has a spatial relationship with multiple target features, it is counted as many times as it is matched against the target feature. For example, if a point is within three polygons, the point is counted three times, once for each polygon.
  • When the selected Spatial relationship is Near geodesic or Near planar, the Join Features tool requires the Target layer is projected or that the output coordinate system is set to a projected coordinate system
  • You can optionally build an expression by which to join features. If you specify an expression, only features that meet the condition will be used. For example, you could only join target features from the field Magnitude if greater than the join feature with a field named Explosion, using the expression $target["Magnitude"] > $join["Explosion"]. Learn more about Arcade expressions with Join Features.

How Join Features works

Calculations

Statistics are calculated for only those features that meet the specified spatial, temporal, or attribute relationship used in the Join one to one operation. You can calculate numeric and string statistics. Using the image above, numeric statistics for the Occupants field and string statistics for the Building_Name field (where Type equals Apartment) would be as follows:

Numeric StatisticResults of Occupants of Type Apartment

Count

Count of:

[130, 8, 250] = 3

Sum

130 + 8 + 250 = 388

Minimum

Minimum of:

[130, 8, 250] = 8

Maximum

Maximum of:

[130, 8, 250] = 250

Average

388/3 = 129.333

Variance

= 14641.33

Standard Deviation

= 121.0014

String StatisticResults of Occupants of Type Apartment

Count

["Silverbirch Estates", "Pine Ridge", "Lake View"] = 3

Any

= "Pine Ridge"

Note:

The count statistic (for strings and numeric fields) counts the number of nonnull values. The count of [0, 1, 10, 5, null, 6] = 5. The count of [Primary, Primary, Secondary, null] = 3.

Parameters

ParameterDescriptionData Type

Target layer

The features which the join tool will process.

Features

Join layer

The layer whose features will be joined to those of the target layer.

Features

Join operation

Whether the join should be one-to-one or one-to-many. This parameter is only available in big data analytics. The join operation in real time analytics is always one-to-one.

  • One-to-one joins always return the same number of results as the target features or less, if there are target features that do not match any join features. Attributes of the join features are summarized as specified in the Summary fields parameter.
  • One-to-many joins returns a record for each match between target and join features. Attributes of the join features are not summarized.

String

Retain all features

Determine whether to retain only the features where there were successful join(s), or to retain all features regardless of whether or not there was a successful join for that features. This option is only available for one to one joins.

For one-to-many joins, this option is not available and only features where there were successful join(s) are returned.

If all features are retained, for features where there was not a join, the COUNT will be 0 and any summary field values will be null.

String

Spatial relationship

Defines the criteria used to spatially join features. This parameter appears if Spatial is checked.

String

Spatial near distance

Join features within this distance of a target feature will be considered for the spatial join. A spatial near distance is only valid when the spatial relationship is Near geodesic or Near planar.

Linear Unit

Temporal relationship

Defines the time criteria used to match features. This parameter appears if Temporal is checked. Different temporal criteria are available depending upon Instant or Interval time features.

  • meets—When a target time interval end is equal to the join time interval start, the target time meets the join time.
  • met by—When a target time interval start is equal to the join time interval end, the target time is met by the join time.
  • overlaps—When a target time interval starts and ends before the start and end of the join time interval, the target time overlaps the join time.
  • overlapped by—When a target time interval starts and ends after the start and end time of the join time interval, the target time is overlapped by the join time.
  • during—When a target time occurs between the start and end of the join time interval, the target time is during the join time.
  • contains—When a join feature time occurs between the start and end of the target time interval, the target time contains the join time.
  • equals—Two times are considered equal if their instants or intervals are identical.
  • finishes—When a target time ends at the same time as a join time, and the target time started after the join time, the target time finishes the join time.
  • finished by—When a join feature time ends at the same time as a target time, and the join time started after the target time, the target time is finished by the join time.
  • starts—When a target time starts at the same time as the join time interval start and ends before the join time interval ends, the target time starts the join time.
  • started by—When a target interval time starts at the same time as the join time and ends after the join time, the target time is started by the join time.
  • intersects—When any part of a target time occurs at the same time as the join time, the target time intersects the join time.
  • near—When a target time is within a specified range of time from the join time, the target time is near the join time.
  • near before—When a target time is before the join time but within a specified range of time from the join time, the target time is near before the join time.
  • near after—When a target time is after the join time but within a specified range of time from the join time, the target time is near after the join time.

String

Temporal near distance

The amount of time between events. Joins will occur between events that occur within this time window of each other. This parameter appears if Temporal relationship is set to Near.

Time Unit

Attribute relationship

Join features based on values within an attribute field. You must specify which attribute field from the target layer matches an attribute field from the join layer. This parameter appears if Attribute is checked.

  • Target field—An attribute field from the target layer containing values to match.
  • Join field—An attribute field from the join layer containing values to match.

String

Summary fields

Statistics that will be calculated on specified fields from the join features. Statistics are calculated for one-to-one joins. Different statistics are available depending on whether the specified field is a string, numeric, or date field.

  • Any—This is a sample string from a field of type string.
  • Count—Calculates the number of nonnull values. It can be used on numeric fields or strings. The count of [null, 0, 2] is 2.
  • Count (distinct)—Calculates the number of distinct, nonnull values. It can be used on numeric fields or strings. The count distinct result of [null, 4, 3, 4] is 2.
  • Sum—The sum of numeric values in a field. The sum of [null, 1, 3] is 4.
  • Square sum—The sum, over all observations, of the squared differences of each observation from the overall mean. The sum of squares of [null, 2.2, 3.1, 4.7] is 3.206.
  • Min—The minimum value of a numeric field. The minimum of [0, 2, null] is 0.
  • Max—The maximum value of a numeric field. The maximum value of [0, 2, null] is 2.
  • Mean—The mean of numeric values. The mean of [0,2, null] is 1.
  • Range—The range of a numeric field. This is calculated as the minimum value subtracted from the maximum value. The range of [0, null, 1] is 1. The range of [null, 4] is 0.
  • Variance—The variance of a numeric field in a track. The variance of [1] is null. The variance of [null, 1,1,1] is 1.
  • Standard Deviation—The standard deviation of a numeric field. The standard deviation of [1] is null. The standard deviation of [null, 1,1,1] is 1.

String

Join condition

Applies a condition to specified fields. Only features with fields that meet these conditions will be joined.

For example, you could apply a join to features where the attribute HealthSpending in the join layer is greater than 20 percent of the attribute Income in the target layer. The join condition to apply this expression is: $join["HealthSpending"] > $target["Income"] * .2

String

Considerations and limitations

  • Summary statistics will only be calculated if a join one-to-one operation is specified.
  • Real-time analytics support one-to-one joins only.