Open Table of Contents

ET GeoWizards Scripting

Spatial Join
This function is not available via the GUI of ET GeoWizards and only offers an easy implementation of the standard ArcObjects ISpatialJoin Interface

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

Syntax    

Dim ET As  New ETGW_Core
Set variable = ET.Spatial_Join(pInFeatureClass, pJoinFeatureClass, sOutFileName, sJoinType, bLeftOuter, dSearchTol)

The Spatial_Join method syntax has the following object qualifier and arguments:

Part Description
variable An IFeatureClass object
pInFeatureClass Required. An IFeatureClass object . The source feature class- the attributes of the Join feature class will be appended to the attribute table of this feature class
pJoinFeatureClass Required. An IFeatureClass object . The feature class which attributes will be joined to the Source feature class
sOutFileName Required. A String - the full name of the output feature class (A feature class with the same full name should not exist)
sJoinType Required. A String -  the join type  to be used. The available options are (Case sensitive): 
  • "Nearest" - Joins with the nearest feature in the join feature class. Only features within a distance of dSearchTol will be joined. A dSearchTol of -1 means infinity.
  • "Within" - Joins a feature in the Source feature class with the feature if it falls within in the Join feature class.
  • "Aggregate" - Only features within a distance of dSearchTol will be joined. A dSearchTol of -1 means infinity.

Please read the help for ISpatialJoin interface in the ArcObjects developers help

bLeftOuter Required. 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.
dSearchTol Required. A Double representing the search tolerance

Example