Generate near table crashes arcpy for ArcGIS Pro

459
3
08-24-2021 06:38 PM
WenxinYang
New Contributor

Hi there,

I've been working on some polygons lately and scripting with arcpy in ArcGIS Pro (version 2.8.1).

The main task that I need to do is to generate near tables of AOI shapefiles of every state of the U.S., and each shapefile contains 1,000 to 2,000 small polygons. The search radius we are setting is about 300km, and we are calculating geodesic distances. The projection we're using is azimuthal equidistant.

I created a loop to go through the generating near table process for every state, but no matter if I run it with jupyter notebook within arcpro or as a standalone python script in the command line, it stopped running after the first state. In the arcpro environment, the software just crashed and closed itself. In command line, it also looks like it crashed because no following messages were printed.

I am wondering if there is any particular reason for this to happen and if there is any possible workaround to it.

Really appreciate your time and help! (please help me)

 

Thanks.

0 Kudos
3 Replies
WenxinYang
New Contributor

ps, the generated near table contains 25,300 rows, which I don't know if it's the maximum output number...

0 Kudos
DanPatterson
MVP Esteemed Contributor

Use featureclasses in a geodatabase (not shapefiles) to increase the odds of success.

Could be an error in the (missing) script (?)  Software just crashing could point to a larger issue.

Does the script work for one state? (pick a small one)  

Are your computer specs exceeding Pro's recommendations? ArcGIS Pro 2.8 system requirements—ArcGIS Pro | Documentation run the link at the top of the page.


... sort of retired...
WenxinYang
New Contributor

Thank you so much for the response! It looked like that the calculation was too much for my computer, so they crashed at certain point. (The script worked fine for some smaller states.) At last, I found that the python environment provided by arcmap was more stable that although it's a lot slower, it could actually run the loop from beginning to the end.

0 Kudos