Model Builder/ArcGIS crash using Spatial Join in a model

3257
23
09-07-2011 12:56 PM
MartyAnderson
New Contributor
I'm trying to create a simple model that performs a spatial join of a dem (points, target features) to catch basins (points, join features). I'm doing a One-to-One join with the Closest option. I can perform the join with no issues using the Spatial Join tool in the toolbox, but anytime I try to do this within a model in model builder, ArcMap crashes. I'm using ArcGIS 10 and it doesn't appear to be a ram issue.

I've searched the forums for similar problems and haven't found anything....

Any thoughts or remarks would be appreciated.

Marty Anderson
0 Kudos
23 Replies
NobbirAhmed
Esri Regular Contributor
It may happen if you are using fairly large datasets as inputs. I have tried with various datasets and couldn't repro the crash on my XP machine (10 sp3). Please refere to my previous posts and provide more details - I can help if I can repro the issue on my machine. Thanks.
0 Kudos
PeterHevenor
New Contributor II
Unfortunately I was not able to get the One to One Closest to work within a model. I was using a fairly large data set, 8k features.

I was using it in an attempt to thin features to eliminate overprint. It's a bit of a mouthful but, the model created polygon buffers for the points, ran an intersect to find areas of overprint, dissolved the polys so there was one per overprint, converted those polys to points and tried to select at a one to one relationship to remove one of the offending points.
I was able to come up with a work around using feature ID's but since I was only concerned with the one to one relationship and not necessarily the closest it might not work for your case.
-Pete
0 Kudos
PeterHevenor
New Contributor II
Nobbir,
Here is some sample data and a model that crashes when using spatial join.
Windows 7.
SP 3
0 Kudos
KarinHenrikson
New Contributor II
Hi,
I am also having the same problem in model builder. I am trying to do spatial join with closest, between two point layers. The have 639 objects in them. Since they also are identical I can use "are identical" instead, which works fine. I have sp3 as well.
It would be great if there was a solution to this problem.
/Karin Henrikson
0 Kudos
NobbirAhmed
Esri Regular Contributor
Here is some sample data and a model that crashes when using spatial join.
Windows 7. SP 3


Thanks a lot for providing me with the repro case (data and model). I could repro the crash on Win 7. It works fine on XP. We are investigating the iussue. I'll keep you updated.
0 Kudos
AndrewBrown
New Contributor III
I created a model using the SpatialJoin tool with two Point shapefiles, 1-1, Keep All and Closest that would crash AGD 10 SP2 through SP4.
I exported it to a python script in the Arcpy directory and was able to run it without problems in the Python Shell.

The model also ran in AGD 10 SP1.

I'm running Win7 64bit

Andrew
0 Kudos
NobbirAhmed
Esri Regular Contributor
Sorry to all for the unintended behavior of our tool 😞 The issue is being addressed and will be delivered through a general patch soon. The patch will address NIM079064, NIM068881 and NIM079126. The fixes will also go into 10 sp5.
The first two NIMs solve the crash issue and the third one solves the field mapping issue (join field values becoming NULL).
0 Kudos
SanderSchaminee
New Contributor
Great work, thanks a lot!
0 Kudos
Jasonvan_Warmerdam
New Contributor
I am having the same issue, when trying to use the Match Option CLOSEST in model builder arcmap crashes. On its own Spatial join preforms as expected. any help would be appreciated.

JOIN_ONE_TO_ONE
Keep All target Features: True

I have sp3 installed.


I was having a VERY difficult time incorporating the SpatialJoin_analysis function into my python scripting process. After much trial and error I found that you can not have the geoprocessing window open, and you need to uncheck Always run in foreground from your scripts properties under the General tab. This makes it hard to see what step the script is on, but is the only way to get the spatial join with the above parameters to work.
0 Kudos
NobbirAhmed
Esri Regular Contributor
@JasonWarmerdam:
Apolozy for your trouble. Please see my post above (#17).

Meanwhile, although you cannot see the messages while running, you can check those out when the tool finishes running in the Results window.
0 Kudos