Display Name: Spatial Join
Description: Joins attributes from one feature to another based on the spatial relationship. The target features and the joined attributes from the join features are written to the output feature class.
Category:
Help URL: https://dpwgis.baltimorecity.gov/ags102/rest/directories/arcgisoutput/SpatialJoin_GPServer/SpatialJoin/SpatialJoin.htm
Execution Type: esriExecutionTypeAsynchronous
Parameters:
Parameter: target_features
Data Type: GPFeatureRecordSetLayer
Display Name Target Features
Description: Attributes of the target features and the attributes from the joined features will be transferred to the output feature class. However, a subset of attributes can be defined in the field map parameter.
Direction: esriGPParameterDirectionInput
Dependency:
Default Value:
Geometry Type: esriGeometryPolyline
HasZ: false
HasM: false
Spatial Reference: 102100
(3857)
Fields:
-
fid
(
type: esriFieldTypeOID, alias: db_hti2b.hsu_fp0k6.RouteInput_Route_Input.fid
)
-
shape_leng
(
type: esriFieldTypeDouble, alias: Shape_Leng
)
-
lf
(
type: esriFieldTypeInteger, alias: LF
)
-
size
(
type: esriFieldTypeString, alias: Size, length: 254
)
-
material
(
type: esriFieldTypeString, alias: Material, length: 254
)
-
method
(
type: esriFieldTypeString, alias: Method, length: 254
)
-
wet_impact
(
type: esriFieldTypeInteger, alias: Wet_Impact
)
-
stream_imp
(
type: esriFieldTypeInteger, alias: Stream_Imp
)
-
slope_25gr
(
type: esriFieldTypeInteger, alias: Slope_25gr
)
-
shape_Length
(
type: esriFieldTypeDouble, alias: shape_Length
)
Features: None.
Parameter Type: esriGPParameterTypeRequired
Category:
Parameter: join_features
Data Type: GPFeatureRecordSetLayer
Display Name Join Features
Description: The attributes from the join features will be joined to the attributes of the target features. See the explanation of the Join Operation parameter for details on how the aggregation of joined attributes are affected by the type of join operation.
Direction: esriGPParameterDirectionInput
Dependency:
Default Value:
Geometry Type: esriGeometryPolyline
HasZ: false
HasM: false
Spatial Reference: 102100
(3857)
Fields:
-
fid
(
type: esriFieldTypeOID, alias: db_hti2b.hsu_fp0k6.RailRoads_Railroads.fid
)
-
fnode_
(
type: esriFieldTypeDouble, alias: FNODE_
)
-
tnode_
(
type: esriFieldTypeDouble, alias: TNODE_
)
-
lpoly_
(
type: esriFieldTypeDouble, alias: LPOLY_
)
-
rpoly_
(
type: esriFieldTypeDouble, alias: RPOLY_
)
-
length
(
type: esriFieldTypeDouble, alias: LENGTH
)
-
railroad_
(
type: esriFieldTypeDouble, alias: RAILROAD_
)
-
railroad_i
(
type: esriFieldTypeDouble, alias: RAILROAD_I
)
-
tag
(
type: esriFieldTypeString, alias: TAG, length: 15
)
-
type
(
type: esriFieldTypeString, alias: TYPE, length: 3
)
-
subtype
(
type: esriFieldTypeString, alias: SUBTYPE, length: 6
)
-
source
(
type: esriFieldTypeInteger, alias: SOURCE
)
-
srcdate
(
type: esriFieldTypeDate, alias: SRCDATE, length: 29
)
-
symbol
(
type: esriFieldTypeInteger, alias: SYMBOL
)
-
prind
(
type: esriFieldTypeString, alias: PRIND, length: 1
)
-
lock__id
(
type: esriFieldTypeDouble, alias: LOCK__ID
)
-
phase__id
(
type: esriFieldTypeInteger, alias: PHASE__ID
)
-
object__id
(
type: esriFieldTypeInteger, alias: OBJECT__ID
)
-
shape_leng
(
type: esriFieldTypeDouble, alias: Shape_Leng
)
-
shape_Length
(
type: esriFieldTypeDouble, alias: shape_Length
)
Features: None.
Parameter Type: esriGPParameterTypeRequired
Category:
Parameter: out_feature_class
Data Type: GPFeatureRecordSetLayer
Display Name Output Feature Class
Description: A new feature class containing the attributes of the target and join features. By default, all attributes of target features and the attributes of the joined features will be written to the output. However, the set of attributes to be transferred can be controlled by the field map parameter.
Direction: esriGPParameterDirectionOutput
Dependency:
Default Value:
Geometry Type: esriGeometryPolyline
HasZ: false
HasM: false
Spatial Reference: 102100
(3857)
Fields:
-
OBJECTID
(
type: esriFieldTypeOID, alias: db_hti2b.hsu_fp0k6.RouteInput_Route_Input.fid
)
-
Join_Count
(
type: esriFieldTypeInteger, alias: Join_Count
)
-
TARGET_FID
(
type: esriFieldTypeInteger, alias: TARGET_FID
)
-
shape_leng
(
type: esriFieldTypeDouble, alias: Shape_Leng
)
-
lf
(
type: esriFieldTypeInteger, alias: LF
)
-
size
(
type: esriFieldTypeString, alias: Size, length: 254
)
-
material
(
type: esriFieldTypeString, alias: Material, length: 254
)
-
method
(
type: esriFieldTypeString, alias: Method, length: 254
)
-
wet_impact
(
type: esriFieldTypeInteger, alias: Wet_Impact
)
-
stream_imp
(
type: esriFieldTypeInteger, alias: Stream_Imp
)
-
slope_25gr
(
type: esriFieldTypeInteger, alias: Slope_25gr
)
-
fnode_
(
type: esriFieldTypeDouble, alias: FNODE_
)
-
tnode_
(
type: esriFieldTypeDouble, alias: TNODE_
)
-
lpoly_
(
type: esriFieldTypeDouble, alias: LPOLY_
)
-
rpoly_
(
type: esriFieldTypeDouble, alias: RPOLY_
)
-
length
(
type: esriFieldTypeDouble, alias: LENGTH
)
-
railroad_
(
type: esriFieldTypeDouble, alias: RAILROAD_
)
-
railroad_i
(
type: esriFieldTypeDouble, alias: RAILROAD_I
)
-
tag
(
type: esriFieldTypeString, alias: TAG, length: 15
)
-
type
(
type: esriFieldTypeString, alias: TYPE, length: 3
)
-
subtype
(
type: esriFieldTypeString, alias: SUBTYPE, length: 6
)
-
source
(
type: esriFieldTypeInteger, alias: SOURCE
)
-
srcdate
(
type: esriFieldTypeDate, alias: SRCDATE, length: 8
)
-
symbol
(
type: esriFieldTypeInteger, alias: SYMBOL
)
-
prind
(
type: esriFieldTypeString, alias: PRIND, length: 1
)
-
lock__id
(
type: esriFieldTypeDouble, alias: LOCK__ID
)
-
phase__id
(
type: esriFieldTypeInteger, alias: PHASE__ID
)
-
object__id
(
type: esriFieldTypeInteger, alias: OBJECT__ID
)
-
shape_leng_1
(
type: esriFieldTypeDouble, alias: Shape_Leng
)
-
SHAPE__Length_1
(
type: esriFieldTypeDouble, alias: SHAPE__Length
)
-
shape_Length
(
type: esriFieldTypeDouble, alias: shape_Length
)
Features: None.
Parameter Type: esriGPParameterTypeRequired
Category:
Parameter: join_operation
Data Type: GPString
Display Name Join Operation
Description: Specifies how joins between the target features and join features will be handled in the output feature class if multiple join features are found that have the same spatial relationship with a single target feature.Join one to one—If multiple join features are found that have the same spatial relationship with a single target feature, the attributes from the multiple join features will be aggregated using a field map merge rule. For example, if a point target feature is found within two separate polygon join features, the attributes from the two polygons will be aggregated before being transferred to the output point feature class. If one polygon has an attribute value of 3 and the other has a value of 7, and a Sum merge rule is specified, the aggregated value in the output feature class will be 10. This is the default.Join one to many—If multiple join features are found that have the same spatial relationship with a single target feature, the output feature class will contain multiple copies (records) of the target feature. For example, if a single point target feature is found within two separate polygon join features, the output feature class will contain two copies of the target feature: one record with the attributes of one polygon and another record with the attributes of the other polygon.
Direction: esriGPParameterDirectionInput
Dependency:
Default Value: JOIN_ONE_TO_ONE
Parameter Type: esriGPParameterTypeOptional
Category:
Choice List: [ JOIN_ONE_TO_ONE, JOIN_ONE_TO_MANY ]
Parameter: join_type
Data Type: GPBoolean
Display Name Keep All Target Features
Description: Specifies whether all target features will be maintained in the output feature class (known as outer join) or only those that have the specified spatial relationship with the join features (inner join).Checked—All target features will be maintained in the output (outer join). This is the default.Unchecked—Only those target features that have the specified spatial relationship with the join features will be maintained in the output feature class (inner join). For example, if a point feature class is specified for the target features, and a polygon feature class is specified for the join features, with a Match Option value of Within, the output feature class will only contain those target features that are within a polygon join feature. Any target features not within a join feature will be excluded from the output.
Direction: esriGPParameterDirectionInput
Dependency:
Default Value: true
Parameter Type: esriGPParameterTypeOptional
Category:
Parameter: field_mapping
Data Type: GPString
Display Name Field Map
Description: The attribute fields that will be in the output with the corresponding field properties and source fields. By default, all fields from the inputs will be included.Fields can be added, deleted, renamed, and reordered, and you can change their properties.Merge rules allow you to specify how values from two or more input fields are merged or combined into a single output value. There are several merge rules you can use to determine how the output field will be populated with values.First—Use the input fields' first value.Last—Use the input fields' last value.Join—Concatenate (join) the input field values.Sum—Calculate the total of the input field values.Mean—Calculate the mean (average) of the input field values.Median—Calculate the median (middle) of the input field values.Mode—Use the value with the highest frequency.Min—Use the minimum value of all the input field values.Max—Use the maximum value of all the input field values.Standard deviation—Use the standard deviation classification method on all the input field values.Count—Find the number of records included in the calculation.
Direction: esriGPParameterDirectionInput
Dependency:
Default Value: shape_leng "Shape_Leng" true true false 0 Double 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RouteInput/FeatureServer/0,shape_leng,-1,-1;lf "LF" true true false 0 Long 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RouteInput/FeatureServer/0,lf,-1,-1;size "Size" true true false 254 Text 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RouteInput/FeatureServer/0,size,0,254;material "Material" true true false 254 Text 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RouteInput/FeatureServer/0,material,0,254;method "Method" true true false 254 Text 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RouteInput/FeatureServer/0,method,0,254;wet_impact "Wet_Impact" true true false 0 Long 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RouteInput/FeatureServer/0,wet_impact,-1,-1;stream_imp "Stream_Imp" true true false 0 Long 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RouteInput/FeatureServer/0,stream_imp,-1,-1;slope_25gr "Slope_25gr" true true false 0 Long 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RouteInput/FeatureServer/0,slope_25gr,-1,-1;SHAPE__Length "SHAPE__Length" false true true 0 Double 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RouteInput/FeatureServer/0,SHAPE__Length,-1,-1;fnode_ "FNODE_" true true false 0 Double 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RailRoads/FeatureServer/0,fnode_,-1,-1;tnode_ "TNODE_" true true false 0 Double 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RailRoads/FeatureServer/0,tnode_,-1,-1;lpoly_ "LPOLY_" true true false 0 Double 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RailRoads/FeatureServer/0,lpoly_,-1,-1;rpoly_ "RPOLY_" true true false 0 Double 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RailRoads/FeatureServer/0,rpoly_,-1,-1;length "LENGTH" true true false 0 Double 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RailRoads/FeatureServer/0,length,-1,-1;railroad_ "RAILROAD_" true true false 0 Double 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RailRoads/FeatureServer/0,railroad_,-1,-1;railroad_i "RAILROAD_I" true true false 0 Double 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RailRoads/FeatureServer/0,railroad_i,-1,-1;tag "TAG" true true false 15 Text 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RailRoads/FeatureServer/0,tag,0,15;type "TYPE" true true false 3 Text 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RailRoads/FeatureServer/0,type,0,3;subtype "SUBTYPE" true true false 6 Text 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RailRoads/FeatureServer/0,subtype,0,6;source "SOURCE" true true false 0 Long 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RailRoads/FeatureServer/0,source,-1,-1;srcdate "SRCDATE" true true false 29 Date 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RailRoads/FeatureServer/0,srcdate,-1,-1;symbol "SYMBOL" true true false 0 Long 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RailRoads/FeatureServer/0,symbol,-1,-1;prind "PRIND" true true false 1 Text 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RailRoads/FeatureServer/0,prind,0,1;lock__id "LOCK__ID" true true false 0 Double 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RailRoads/FeatureServer/0,lock__id,-1,-1;phase__id "PHASE__ID" true true false 0 Long 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RailRoads/FeatureServer/0,phase__id,-1,-1;object__id "OBJECT__ID" true true false 0 Long 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RailRoads/FeatureServer/0,object__id,-1,-1;shape_leng_1 "Shape_Leng" true true false 0 Double 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RailRoads/FeatureServer/0,shape_leng,-1,-1;SHAPE__Length_1 "SHAPE__Length" false true true 0 Double 0 0,First,#,https://dpw-gis108-dev.baltimore.city/arcgisdev108/rest/services/Hosted/RailRoads/FeatureServer/0,SHAPE__Length,-1,-1
Parameter Type: esriGPParameterTypeOptional
Category: Fields
Parameter: match_option
Data Type: GPString
Display Name Match Option
Description: Specifies the criteria that will be used to match rows.Intersect—The features in the join features will be matched if they intersect a target feature. This is the default. Specify a distance in the Search Radius parameter.Intersect 3D— The features in the join features will be matched if they intersect a target feature in three-dimensional space (x, y, and z). Specify a distance in the Search Radius parameter.Within a distance—The features in the join features will be matched if they are within a specified distance of a target feature. Specify a distance in the Search Radius parameter.Within a distance geodesic—Same as Within a distance except that geodesic distance is used rather than planar distance. Choose this if your data covers a large geographic extent or the coordinate system of the inputs is unsuitable for distance calculations.Within a distance 3D—The features in the join features will be matched if they are within a specified distance of a target feature in three-dimensional space. Specify a distance in the Search Radius parameter.Contains—The features in the join features will be matched if a target feature contains them. The target features must be polygons or polylines. For this option, the target features cannot be points, and the join features can only be polygons when the target features are also polygons.Completely contains—The features in the join features will be matched if a target feature completely contains them. Polygon can completely contain any feature. Point cannot completely contain any feature, not even a point. Polyline can completely contain only polyline and point.Contains Clementini—This spatial relationship yields the same results as Completely contains with the exception that if the join feature is entirely on the boundary of the target feature (no part is properly inside or outside) the feature will not be matched. Clementini defines the boundary polygon as the line separating inside and outside, the boundary of a line is defined as its end points, and the boundary of a point is always empty.Within—The features in the join features will be matched if a target feature is within them. It is opposite to Contains. For this option, the target features can only be polygons when the join features are also polygons. Point can be join feature only if point is target.Completely within—The features in the join features will be matched if a target feature is completely within them. This is opposite to Completely contains.Within Clementini—The result will be identical to Within except if the entirety of the feature in the join features is on the boundary of the target feature, the feature will not be matched. Clementini defines the boundary polygon as the line separating inside and outside, the boundary of a line is defined as its end points, and the boundary of a point is always empty.Are identical to—The features in the join features will be matched if they are identical to a target feature. Both join and target feature must be of same shape type—point-to-point, line-to-line, and polygon-to-polygon.Boundary touches—The features in the join features will be matched if they have a boundary that touches a target feature. When the target and join features are lines or polygons, the boundary of the join feature can only touch the boundary of the target feature and no part of the join feature can cross the boundary of the target feature.Share a line segment with—The features in the join features will be matched if they share a line segment with a target feature. The join and target features must be lines or polygons.Crossed by the outline of—The features in the join features will be matched if a target feature is crossed by their outline. The join and target features must be lines or polygons. If polygons are used for the join or target features, the polygon's boundary (line) will be used. Lines that cross at a point will be matched, not lines that share a line segment.Have their center in—The features in the join features will be matched if a target feature's center falls within them. The center of the feature is calculated as follows: for polygon and multipoint the geometry's centroid is used, and for line input the geometry's midpoint is used. Specify a distance in the Search Radius parameter.Closest—The feature in the join features that is closest to a target feature is matched. See the usage tip for more information. Specify a distance in the Search Radius parameter.Closest geodesic—Same as Closest except that geodesic distance is used rather than planar distance. Choose this if your data covers a large geographic extent or the coordinate system of the inputs is unsuitable for distance calculationsLargest overlap—The feature in the join features will be matched with the target feature with the largest overlap.
Direction: esriGPParameterDirectionInput
Dependency:
Default Value: INTERSECT
Parameter Type: esriGPParameterTypeOptional
Category:
Choice List: [ INTERSECT, INTERSECT_3D, LARGEST_OVERLAP, WITHIN_A_DISTANCE_GEODESIC, WITHIN_A_DISTANCE, WITHIN_A_DISTANCE_3D, CONTAINS, COMPLETELY_CONTAINS, CONTAINS_CLEMENTINI, WITHIN, COMPLETELY_WITHIN, WITHIN_CLEMENTINI, ARE_IDENTICAL_TO, BOUNDARY_TOUCHES, SHARE_A_LINE_SEGMENT_WITH, CROSSED_BY_THE_OUTLINE_OF, HAVE_THEIR_CENTER_IN, CLOSEST_GEODESIC, CLOSEST ]
Parameter: search_radius
Data Type: GPLinearUnit
Display Name Search Radius
Description: Join features within this distance of a target feature will be considered for the spatial join. A search radius is only valid when the spatial relationship is specified (the Match Option parameter is set to Intersect, Within a distance, Within a distance geodesic, Have their center in, Closest, or Closest geodesic). For example, using a search radius of 100 meters with the spatial relationship Within a distance will join feature within 100 meters of a target feature. For the three Within a distance relationships, if no value is specified for Search Radius, a distance of 0 is used.
Direction: esriGPParameterDirectionInput
Dependency:
Default Value:
Parameter Type: esriGPParameterTypeOptional
Category:
Parameter: distance_field_name
Data Type: GPString
Display Name Distance Field Name
Description: The name of a field, which will be added to the output feature class, that contains the distance between the target feature and the closest join feature. This parameter is only valid when the spatial relationship is specified (Match Option is set to Closest or Closest geodesic). The value of this field is -1 if no feature is matched within a search radius. If no field name is specified, the field will not be added to the output feature class.
Direction: esriGPParameterDirectionInput
Dependency:
Default Value:
Parameter Type: esriGPParameterTypeOptional
Category:
Supported Operations:
Submit Job