Saturday, 8 September 2018

arcpy - ArcGIS Spatial Join Options Missing


The ArcGIS SpatialJoin online help page has a long list of match_options when joining data spatially, including HAVE_THEIR_CENTER_IN.


However running the arcpy.SpatialJoin_analysis tool in Python with this option results in an error:


ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000800: The value is not a member of INTERSECT | CONTAINS | WITHIN | CLOSEST.

Failed to execute (SpatialJoin).

These options are also missing from ArcToolBox:


enter image description here


The licensing on the help page suggests this tool is available for all versions of ArcGIS:



ArcView: Yes ArcEditor: Yes ArcInfo: Yes



So is this an error in the docs, licensing on keywords, or a misunderstanding on my part?



Answer




Looking at the list of fixes in SP3 it appears it was an error and has been fixed:



NIM070795 - Spatial Join tool not ignoring invalid match options.



I installed the service pack, and now all options are present in the ArcToolbox tool, and my script runs without problems.


Thanks to @sylvester for the suggestion.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...