2

I'm struggling to get an equation working in QGIS that I've seen posted for ArcGIS. This article has a full description. Long story short, the author modifies the original Tobler's Hiking Function for use in ArcGIS, but it won't work in QGIS Raster Calculator. I've spent a few hours working on this with no luck.

The original formula is as follows:

(your_res /1000)/(6 * Exp(-3.5 * Abs(Tan(("your_slope" * 3.14159)/180) + .05)))

"your_res" = resolution/pixel size of DEM (in this case, ASTER) "your_slope" equals slope raster (calculated using Raster -> Analysis -> Slope).

Here's how I modified the equation for QGIS Raster Calculator:

(your_res / 1000) / (6 * 2.71828 ^ (-3.5 * abs ( Tan ( ( "your_slope" * 3.14159)/180) + .05)))

The resulting raster returns few values and basically flattens the image out. Only the most severe slope changes show any variation. I don't have ArcGIS at home to test, but that article is fairly well known to archaeologists and I suspect it works.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
  • Tobler function has maximum at about minus 3 degrees. Your slope raster doesn't have negative values, so it's wrong path. In arcgis it's doable using vertical factor which takes direction into account. – FelixIP Feb 08 '21 at 01:44
  • https://gis.stackexchange.com/questions/190144/toblers-hiking-function-in-pathdistance-arcgis-10-3-1?r=SearchResults – FelixIP Feb 08 '21 at 01:56
  • Any ideas on creating a friction raster using this method - this equation - in QGIS? –  Feb 08 '21 at 02:27
  • It is not doable mate, no matter the syntax of your expression. Perhaps read my first comment again or documentation on path distance in ArcGis help – FelixIP Feb 08 '21 at 03:25
  • "Load the DEM into the application and make note of its spatial resolution (cell size) by right-clicking on it in the Layers list, selecting Properties, and left-clicking on the Source tab. If the values are significantly smaller than 1.0 (e.g., .00027), the DEM has a Geographic Latitude/Longitude projection. To estimate cell size in meters for this case, a general rule of thumb is to multiply the values by 100,000. " – Frodo Feb 08 '21 at 06:09
  • @nagib if it's geographic and you need metres then project the raster, starting off lazy is dangerous - somebody at some stage will make the mistake of believing the raster or its derived products are accurate. If your'e going to do something do it right or not at all. – Michael Stimson Feb 08 '21 at 08:23
  • I've tested this on several DEMs, all converted to projected CRS's. I've also resampled higher resolution DEMs to varying resolutions (10x10, 30,30). That doesn't appear to be the issue as I noted that aspect prior to attempting to create the friction surface. –  Feb 08 '21 at 13:20
  • @ Michael Stimson it was just a quote from a scientific paper cited by AnthroYeti ?! – Frodo Feb 09 '21 at 06:19

0 Answers0