Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

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? I've spent countless number of hours trying to debug the issue and I am stumped...

share|improve this question
    
How many records are we talking here? –  nagytech Aug 10 '12 at 0:43
    
In my most recent failed run, it was 254 points (shapefile) compared to 102 polygons (personal gdb). Of the 254 points, the top 139 were returned with -1. –  RyanDalton Aug 10 '12 at 14:24
    
Is the GDB perhaps on a network drive? –  nagytech Aug 11 '12 at 2:52
    
@Geoist - Yes, the geodatabase and shapefiles are both on a network drive! Is this a known issue? –  RyanDalton Aug 13 '12 at 15:51
1  
From personal experience I've noted that networked datasets can impede the speed of processing. So, it's not so much a known issue as it is a limitation of the computing environment. It may not be what's causing your particular issue, but it may be worth working on a local copy to see what happens. –  nagytech Aug 13 '12 at 22:16

3 Answers 3

up vote 3 down vote accepted

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.

share|improve this answer
    
From my experience same issue happens if you run near analysis consecutively on the same dataset. First analysis returns the right data, but when I rerun it I get -1. The fix is just to restart ArcGIS. This was happening in ArcGIS 10.0 not sure if it's fixed now. –  jareks Aug 14 '13 at 9:57

According the help files for the Near Analysis process this will occur is you have a selection in your analysis and the other values are assigned a value of -1. If this is not the case then you will need to elaborate.

share|improve this answer
    
Dan, there were no selected point (input) or polygon (near) features. –  RyanDalton Aug 10 '12 at 14:24

I've experienced same issues with near as Ryan described. In my case providing some kind of search radius resolved the situation.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.