Open Table of Contents

Spatial Join

This function is not available via the GUI of ET GeoWizards.

Joins the attributes of feature classes based on the spatial relationships of the features.

Command line syntax

ET_GPSpatialJoin <input_dataset> <join_dataset> <out_feature class> <Nearest | Within | Intersects | Contains> {left_outer_join} {search_tolerance}

Parameters

Expression Explanation
<input_dataset> A Point, Polyline or Polygon feature class or feature layer
<join_dataset> A Point, Polyline or Polygon feature class or feature layer. The features of this dataset will be used for clipping
<out_feature class> A String - the full name of the output feature class (A feature class with the same full name should not exist)
<Nearest | Within | Intersects | Contains> Join Type. A String -  the join type  to be used. The available options are: 
  • "Nearest" - Joins with the nearest feature in the join feature class. Only features within a distance of {search_tolerance} will be joined. A {search_tolerance} of -1 means infinity.
  • "Within" - Joins if a feature from the input dataset is within a feature of the join dataset.
  • "Intersects" - Joins if a feature from the input dataset intersects a feature of the join dataset.
  • "Contains" Joins if a feature from the input dataset contains a feature of the join dataset.
{left_outer_join} A Boolean -  Indicates whether a match is required before adding a record from the source feature class to the result. If True, all records in the Source feature class are added regardless of whether there is a match.
{search_tolerance} A Double representing the search tolerance

Scripting syntax

ET_GPSpatialJoin (input_dataset, join_dataset, out_feature class, join_type, left_outer_join, search_tolerance)

See the explanations above:
<> - required parameter
{} - optional parameter

.NET implementation

SpatialJoin(pInFC As IFeatureClass, pJoinFC As IFeatureClass, sOutFName As String, sJoinType As String, bLeftOuter As Boolean, dSearchTol As Double) As IFeatureClass

Copyright Ianko Tchoukanski