3

I have a point dataset and a polyline dataset that I am running a spatial join on. I noticed that if I run the spatial join with the point FC, the ouput differs from if I run it with a point shapefile. It seems that if the tool finds a spatial match but an attribute is Null, it will retrieve attributes from another point that also has the spatial match. This results in 'mixed' attributes from two different points in the ouput. The 'Join Operation' was set to ONE_TO_ONE. I am using ArcGIS Desktop 10.4.1.

enter image description here

enter image description here

Is the tool designed this way? It seems incorrect considering I set the 'Join Operation' to ONE_TO_ONE and it's pulling attributes from two different join features

asked Nov 8, 2018 at 21:02
2
  • Are you using a Merge Rule for any fields? Commented Nov 12, 2018 at 22:19
  • No, I'm just using 'Frst' for all fields. Commented Nov 13, 2018 at 13:44

1 Answer 1

5
+50

The attribute mixing, as you say, is controlled by the merge rules. If you didn't explicitly modify the rules, it will default to "first". According to the docs:

The merge rule property of an output field allows you to specify how values from two or more input fields are merged into a single output value. Null values will be excluded from all merge calculations.

However shapefiles can't store null values, so a "blank" attribute will be considered when evaluating what comes first.

So the Spatial Join does appear to be working as designed, it's a difference in input values due to the format chosen.

answered Nov 12, 2018 at 21:31
2
  • So the output field [TARGET_FID] doesn't really mean much considering I'm getting attributes from two different target features? Commented Nov 13, 2018 at 13:44
  • Ah I didn't notice that bit. If I remember correctly the TARGET_FID would be the target OBJECTID when the input is a feature class. And since OBJECTIDs are 1-indexed whereas FIDs are 0-indexed, so that value of 19 might actually correspond to different features. Correct me if I'm wrong Commented Nov 13, 2018 at 18:07

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.