I am running spatial join tool, joining points to points : I wish to determine for each point in the target dataset the nearest feature in the join dataset, and to record that distance.
Both the join and the target dataset have the same (projected) coordinate system. They are both visible on the map.
Attachment#1 shows my table of contents. The target dataset is nswdb_2019q2_project. The join dataset is Chic Grocery Stores 2015.
The tool fails: see Attachment#2
Why does it fail? I have noticed this kind of failure before, intermittently, when the join dataset is in a group layer (as it is here).
When I move the Chic Grocery Stores 2015 layer outside the group layer, the join works.
I have edited this posting to use the terminology used by the tool. )2019-06-18 15:57 EST). There was no change to the substance of the problem.
First inclination when 000229 shows up is to rename everything so that there are no spaces in the paths.
rename the group layer first and see if space are an issue for it.
then follow up by renaming or using another variant which doesn't have spaces in the path or filename.
I now how been able to replicate my original problem (the one before
this other issue
about visible/invisible fields arose.
I try to join the two point layers, and the join fails claiming the second
dataset (part of a group layer) does not exist.
If you can screen share that would be helpful.
I changed the name of the group and replaced blanks with underscores. No joy. Then I changed the name of the layer similarly. Still no joy. Being an old Unix jockey, I am always suspicious of using white space in anything that might be or become a data object. You seem of like mind.
I know this join has worked for me within the last week. There is no obvious reason it would now fail except pure passage of time. There seems to be some environmental factor (I use the word loosely, not in the ESRI sense) which is causing this sometimes to fail. But nothing I can so far reproduce.
Dan, if you don't watch out, answering my posts to this community will wear you out. Ty. I am convinced this is a bug, and I have now reported it as a new case #02346902.
Just tried it... spaceless files in spaceless gdb in spaceless group.
Worked as planned... only difference... I am using ArcGIS Pro 2.4 Beta 2.
So if it was a bug, it is fixed or it is something about your files and/or environment
So I closed the map. Opened it again (new invocation of arcmap) and the join now works. I suspect that I will try it again in a few hours, and it will fail.
I find this all too typical of ESRI software. I have had a suspicion for a very long while that cleanup after greoprocessing operations is not properly performed. I would be willing to bet that there are memory leaks.
What is abundantly clear is that multiple invocations of the same tool can have quite different results depending upon the history of the specific arcmap invocation. A specific example of this kind of thing occurred with the arcpy tools a while back (reported by me as bug back then). One of these APIs performed a cd (change directory) without then reverting back to the original directory afterwards. The calling code was looping through a list of files, and suddenly could no longer find the next file on the list. Fine programming.
This continues to be a problem, and I have filed a bug against it: case02346902
The join frequently works, but then will sometimes fail. Once it has failed once, it will continue to fail. But if the map is saved, arcmap exited, and the map reopened, it will start working again.
It is very clear that some software structure is being corrupted, but I am unable to come up with a precise sequence of operations that will cause the failure. Frankly, I am not paid to troubleshoot ESRI products, and this kind of investigation is really time consuming.
I will report back when technical support have looked into this further.
UPDATE: this problem is hard to replicate. Now, six months after the original. I am encountering the same problem again. I have a new bugID 02478740
If anyone else has encountered strange behavior of spatial joins please report them here.
Synopsis: spatial join of points to polygons using "within". It usually works. But it seems
to start failing after one has invoked it incorrectly (say one had the criteria wrong, or
was trying to join points to points using within). Thereafter it fails to perform the join
correctly. There may be other circumstances that trigger the failure. It is hard to reproduce
at will: I have not found a consistent way to do so.