Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to use the Vector ruggedness measure (VRM) tool available from http://arcscripts.esri.com/details.asp?dbid=15423. However, I am using ArcGIS 10.2 for Desktop and these tools are made for 9.0, 9.1 and 9.3 only. I have tried to run this tool regardless and get the error:

Traceback (most recent call last): File "C:\Users\jc221340\Documents\project\Processed data\My_tools\Downloaded\ruggedness.py", line 20, in gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Spatial Analyst Tools.tbx") RuntimeError: Object: Toolbox C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Spatial Analyst Tools.tbx does not exist

Failed to execute (Ruggedness(VRM)).

How can I use this tool?

share|improve this question

Since you are using v10.2 it is looking for the path of the Spatial Analyst toolbox which has changed directory locations slightly from v9:

To update, open the ruggedness.py file using Notepad or some other text editor and change line 20 path to something like this:

C:\Program Files (x86)\ArcGIS\Desktop10.2\ArcToolbox\Toolboxes\Spatial Analyst Tools.tbx
share|improve this answer
1  
Problem solved, thanks! – jc22 Aug 13 '14 at 23:11
1  
@jc22 Since this solved your problem I think you should click the green Accept button to reward the answerer. – PolyGeo Dec 15 '14 at 23:38

I also met problem when executing VRM on ArcGIS 10.1. The answer above was helpful but not enough. The VRM tool generated aspect, slope, x, y, z...etc files, and then showed the completion of process. The following methods such as generation of ruggedness layer and deletion of intermediate files were skipped and ignored.

The problem was solved by using "Benthic Terrain Modeler" instead to calculate VRM.

share|improve this answer

I had the same problem. I emailed the tool's creator, Mark Sappington, he has updated this tool for newer versions of ArcGIS and the new Python script and ArcGIS toolbox can be downloaded here: http://www.arcgis.com/home/item.html?id=9e4210b3ee7b413bbb1f98fb9c5b22d4

This has worked with my version 10.2.

Good luck!

share|improve this answer
    
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review – MaryBeth Mar 23 at 15:47

You can easily replicate this metric using raster algebra. This example is written in in raster algebra pseudo code and should be easy to adapt to any GIS software supporting raster analysis.

Calculate slope and aspect using a constant to convert to radians

slope = slope(dem, units = degrees) * 0.0175
aspect = aspect(dem) * 0.0175

Apply cosine and sine function. For aspect, commonly GIS software assigns a -1 to flat areas. Because of this, you may need to use a con statement to deal with converting negative values to zero.

sin.slp = cos(slope) 
cos.slp = sin(slope) 

sin.asp = con(aspect == -1, 0, sin(aspect) * sin.asp) 
cos.asp <- con(aspect == -1, 0, cos(aspect) * sin.asp) 

Apply focal sum function for the desired scale (focal neighborhood)

scale = 5
x.sum = focal(sin.asp, window = scale, function = sum) 
y.sum = focal(cos.asp, window = scale, function = sum) 
z.sum = focal(cos.slp, window = scale, function = sum) 

The Vector Ruggedness Measure (VRM) is 1 - the square root of the squared sums of the focal rasters divided by the squared scale.

vrm = 1 - ( sqrt( sqr(x.sum) + sqr(y.sum) + sqr(z.sum)) / sqr(scale) ) 
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.