I am trying to perform a spatial join between city polygons and county polygons. When a city is completely within a county I would like to add the county name to the city polygon. Some cities do not fall completely within a county and I would not like to join them. The join works in ArcMap if I right click the city shapefile and select join, join based on spatial location, and then click the radio button next to "Each polygon will be given the attributes of the polygon it falls completely inside of in the layer being joined. If a polygon falls..." However, if I open the spatial join tool and then execute the join with "COMPLETELY_WITHIN" match option it will fail with no error message if background processing is on or hang at 37% of final step if background processing is off. I have also tried adding both shapefiles to a geodatabase before joining and executing Python script outside of ArcMap but this also fails.

I suspect the options for the join executed from the context menu must be different than the join I am creating with the spatial join tool (the join is successful from context menu, but not from spatial join tool). Is the join executed from the context menu the same join I am executing from the spatial join tool?

  • Does joining the files from not within the context menu produce the same error? Note that you asked two questions. (1. are the joins different? 2. how do i join in python?). If you expect the community to give a usefull answer you should rephrase so that only 1 question is asked. – LMB Jun 20 '17 at 14:11

Your Answer

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

Browse other questions tagged or ask your own question.