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

  • Are you using a Merge Rule for any fields? – klewis Nov 12 '18 at 22:19
  • No, I'm just using 'Frst' for all fields. – mdholl6188 Nov 13 '18 at 13:44
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.

  • So the output field [TARGET_FID] doesn't really mean much considering I'm getting attributes from two different target features? – mdholl6188 Nov 13 '18 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 – mikewatt Nov 13 '18 at 18:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.