1

I am trying to determine the mean and standard deviation from a subset of point features. Once I determine the standard deviation I want to exclude any points that are more than twice the standard deviation from the mean distance.

To do this I tried to run Average Nearest Neighbor for a selected set of records in a WGS_1984 point file using ArcMap 10.2.2 basic. I've excluded ungeocoded records from the analysis and checked to see if my study area was greater than 30 degrees. Keep getting this error:

Traceback (most recent call last):
  File "c:\program files (x86)\arcgis\desktop10.2\ArcToolbox\Scripts\NearestNeighbor.py", line 348, in <module>
    setupNearestNeighbor()
  File "c:\program files (x86)\arcgis\desktop10.2\ArcToolbox\Scripts\NearestNeighbor.py", line 55, in setupNearestNeighbor
    nn = NearestNeighbor(ssdo, concept = concept, studyArea = studyArea)
  File "c:\program files (x86)\arcgis\desktop10.2\ArcToolbox\Scripts\NearestNeighbor.py", line 106, in __init__
    self.setStudyArea()
  File "c:\program files (x86)\arcgis\desktop10.2\ArcToolbox\Scripts\NearestNeighbor.py", line 124, in setStudyArea
    spatialRef = ssdo.spatialRef)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.2\ArcToolbox\Scripts\SSUtilities.py", line 442, in innerFunction
    returnValue = functionName(*args, **kw)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.2\ArcToolbox\Scripts\SSUtilities.py", line 1910, in minBoundGeomPoints
    "", "MBG_FIELDS")
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\management.py", line 2724, in MinimumBoundingGeometry
    raise e
ExecuteError: ERROR 000210: Cannot create output :\ArcGIS\Default.gdb\regularBound_FC0
Failed to execute (MinimumBoundingGeometry).

Thought maybe it was the length of the output name or a lock on the default gdb but get same results even after changing default gdb. Can't manually change the output file as you do not have this option in the tool parameters.

Would like to know if anybody else has run into this problem or knows of a better process for calculating distance standard deviations and means.

4
  • Is your last line really ERROR 000210: Cannot create output :\ArcGIS\Default.gdb\regularBound_FC0 Failed to execute (MinimumBoundingGeometry) or you have done reduction at the file path as quoting here?
    – fatih_dur
    Commented Dec 22, 2016 at 1:18
  • That is the full traceback after getting the script failure line. There is no way to shorten path that I can see.
    – geoJshaun
    Commented Dec 22, 2016 at 1:30
  • I was trying to highlight there is no drive letter in your output path, i.e., :\ArcGIS\Default.gdb\regularBound_FC0
    – fatih_dur
    Commented Dec 22, 2016 at 1:38
  • Sorry. I misunderstood. But that was the actual message. I did not intend to truncate the outpath.There is no option in the tool parameters to specify one.
    – geoJshaun
    Commented Dec 22, 2016 at 1:59

1 Answer 1

1

I think I figured out what is going on. Average Nearest Neighbor is a script in Spatial Statistics toolbox and if you follow the traceback, at one stage it tries to use your system/geoprocessing scratch area to create a scratch name for interim outputs. I believe your scratch workspace in your environment settings or system's TEMP and/or CWD are not setup correctly, therefore it produces this error. Most probably it returns an empty string as the workspace, which implies use default workspace that is :\ArcGIS\Default.gdb\regularBound_FC0.

The solution, I think, is to pick a proper file geodatabase as your Current and Scratch workspaces, from the Environment settings.

For your references, you can check out returnScratchWorkSpace and returnScratchName functions in:

C:\Program Files (x86)\ArcGIS\Desktop10.2\ArcToolbox\Scripts\SSUtilities.py

1
  • That did it. I tried right clicking a geodatabase in arcatalog taskbar and it failed. When I set it within the tool under Environments it worked like a charm. Thanks!
    – geoJshaun
    Commented Dec 22, 2016 at 2:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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