Model Builder, hanging on Near Tool (Analysis Tools, Proximity)

2896
4
Jump to solution
11-01-2012 06:56 AM
PaulBrown2
New Contributor II
Hello,

I have produced rather a large model in Arc10, service pack 4. I have a few Near Tool processes within the model. When I run the model as a whole it will hang on a couple of these Near Processes and just won't carry on, or takes ages and write the information as -1 only!

If I have the model open in edit mode and cancel the process when it starts to hang, I can carry on where it stopped and the near analysis works fine, so there is nothing wrong with any of the inputs etc.

I just need to be able to run the whole Model in one go without this hanging problem, anyone have any ideas?

Thanks and Regards

Paul
0 Kudos
1 Solution

Accepted Solutions
PaulBrown2
New Contributor II
Hi mamcgirr

I have a fair few near processes in my model with a lot of point to line near analysis. The way I made it work was to densify the lines so that there was a vertex every 1 m (this was accurate enough for my application), I converted the vertices to points and subsequently ran the near analysis on the two point feature classes. The model runs through no problem now with the point to point near analysis. You could try converting your feature classes to points if possible, it worked for me.

Paul

View solution in original post

0 Kudos
4 Replies
markmcgirr
New Contributor
I have been running into problems with the NEAR tool in python for 6 months.  Some times it works but mostly it hangs when running the near.  Sometimes it will run the first near, but the second near hangs.

I've tried everything I can think of to get it to work.  Repairing the featureclasses, running the nears on layers and not the FC's.  Copying the featureclasses into feature datasets with different tollerances / resolutions, copying them into new clean FGDB's with nothing else in them.

I've tried using different geoprocessing objects (arcpy.Near vs gp.near)

Nothing consistently fixes the problem.  It's crazy the number of hours I've spent on this problem.
0 Kudos
PaulBrown2
New Contributor II
Hi mamcgirr

I have a fair few near processes in my model with a lot of point to line near analysis. The way I made it work was to densify the lines so that there was a vertex every 1 m (this was accurate enough for my application), I converted the vertices to points and subsequently ran the near analysis on the two point feature classes. The model runs through no problem now with the point to point near analysis. You could try converting your feature classes to points if possible, it worked for me.

Paul
0 Kudos
markmcgirr
New Contributor
That converting it to Points idea was great.  It seems to be running fine for me now.

Thanks.
0 Kudos
PaulBrown2
New Contributor II
Hi Mark,

Excellent, glad it works for you too

Paul
0 Kudos