Monday, 28 August 2017

Slow performing ArcGIS Near tool returns -1?


We are running an ArcGIS 10.0 geoprocessing script written in Python that (as part of many steps above & below) runs the Near tool.


Both the input and output datasets (shapefiles & personal geodatabase, respectively) are on a network drive, in the same projection, and we are not using a search distance (which by default = infinity, I believe). When we run the near command, sometime it successfully runs to completion and sometimes (usually) it only partially works.


When it partially works (but runs to completion), the results typically have anywhere from 1/4 to 1/2 of the features with a NEAR_DIST value = -1 (and it is always the top portion of the records, as sorted by the OID). In these cases, it also takes forever to process the top records, sometimes going from full success runs in 20 seconds to partial success runs in 1.5 hours.


Has anyone else experienced this kind of issue? Any suggestions on WHY the issue is occurring or HOW to fix the issue?



Answer



I'm going to credit @Geoist with the answer to this question, based on his comment above (NOTE: if you repost your comments as an answer, I will give you the "accepted mark").



As it turns out, the issue was in trying to run the NEAR analysis against the personal geodatabase on a network drive. As soon as I changed the source to an ArcSDE or file on the local drive, NEAR finally started completing 1) correctly to completion and 2) quickly.


My recommendation based on these findings is simply this: don't run GP processes over the network.


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...