Hello,
The spatial join tool in ArcMap is rather limited. It only looks for intersecting polygons or 'fall completely inside of' polygons:
I want to spatially join a polygon to another polygon based on whether the centroid falls within it. Is there another way to do this? Python script maybe?
Solved! Go to Solution.
The Spatial Join geoprocessing tool has many more options than the menu spatial join tool, one of which is HAVE_THEIR_CENTER_IN.
Why not produce the centroid layer, then spatially join it to the other layer.
Hmmm yes I could create a whole new centroid layer... Could you tell me (or point me in the right direction) how to go about this? I only have a basic license bear in mind. Dan_Patterson
Sadly FeatureToPoint requires an advanced license... so as suggested below, But everyone has Add XY coordinates, then you just add the table back in (File, Add Data, Add XY data) and save it back out to its own feature class.
Such unnecessary steps. You can do this by other means, but the workflow is only 10s of seconds to complete
Hi Theo,
Under the select by location tool, there is an option to select features that have their centroids falling in the source layer feature.
Lesi
I know, and that's useful for Selecting. But I'm looking to do a spatial join. I have hundreds and thousands of shapes within each layer, all with multiple attribute variation. Lesi Mai
The Spatial Join geoprocessing tool has many more options than the menu spatial join tool, one of which is HAVE_THEIR_CENTER_IN.
dkwiens thank you so much. This is the answer I was hoping for! You've saved me having to go through all the steps of converting polygons to XY event layer points, then joining that to my join layer.
Cheers.