Movecost QGIS Plugin - Complete Guide
Version 2.1 - R-based tool for calculation of slope-dependent accumulated cost surface, least-cost paths, and least-cost corridors related to human movement across the landscape.
Requirements & Setup
Important: Before using this plugin, ensure you have installed and configured the Processing R Provider.
System Requirements
- QGIS 3.0 or higher (fully compatible with QGIS 4 and Qt6)
- Processing R Provider plugin (install from QGIS Plugin Manager)
- R software (version 4.0 or higher recommended)
- R packages:
movecost (>= 2.1), sf, terra, raster, sp
First-Time Setup
2 In QGIS, go to Plugins > Manage and Install Plugins and install "Processing R Provider"
3 Go to Settings > Options > Processing > Providers > R and set the R folder path
4 In movecost plugin, click "Add R Scripts" to copy the R scripts to your QGIS profile
5 The plugin will automatically check and install/update the movecost R package when needed
movecost - Accumulated Cost Surface & Least-Cost Paths
Description
Calculates the anisotropic accumulated cost surface from a point origin, considering slope and various cost models. It also computes least-cost paths from the origin to one or more destination points, and optionally generates cost isolines (isochrones).
Use Cases
- Determine optimal walking routes between archaeological sites
- Calculate travel time or energy expenditure across terrain
- Create isochrone maps showing areas reachable within specific time/cost
- Model historical movement patterns
Tutorial: Calculate Walking Time Between Two Sites
1 Prepare your data:
- DTM raster layer (or use polygon to download elevation data)
- Origin point layer (starting location)
- Destination point layer (target location/s)
2 Click the "movecost" button in the plugin dialog
3 Set parameters:
- CRS: Select the coordinate system matching your data
- DTM: Select your elevation raster
- Origin: Select your starting point layer
- Destination: Select your destination point layer
- Function: Choose 't' (Tobler's function) for walking time
- Time: Select 'h' for hours or 'm' for minutes
4 Run the algorithm and examine outputs:
- Accumulated Cost Surface: Raster showing cost from origin to each cell
- Isolines: Contour lines at regular cost intervals
- LCP: Least-cost path line(s) to destination(s)
Tip: Use the "by Polygon" version if you don't have a DTM - the plugin will download elevation data for your study area automatically.
Outputs
| Output | Type | Description |
| Output_Accumulation_Coast | Raster | Accumulated cost surface from origin |
| Output_Isoline | Vector (lines) | Cost isolines/isochrones |
| Output_LCP | Vector (lines) | Least-cost path(s) to destination(s) |
| Output_LCP_Back | Vector (lines) | Return paths to origin (if enabled) |
| Output_W_Cost | Vector (points) | Destinations with cost values |
movebound - Walking Cost Boundaries
Description
Calculates walking cost boundary polygons around one or more point locations. Unlike movecost's isolines, movebound creates specific boundary limits corresponding to exact walking cost values (e.g., "show me the area reachable in exactly 1 hour").
Use Cases
- Define catchment areas around settlements
- Calculate foraging ranges from base camps
- Determine territorial boundaries based on walking time
- Model daily activity ranges
Tutorial: Create 1-Hour Walking Catchment Area
1 Prepare your data:
- DTM raster or study area polygon
- Point layer with your location(s)
2 Click the "movebound" button
3 Set parameters:
- Points: Select your origin point(s)
- Cont_Value: Set to 1 for 1-hour boundary (if using hours)
- Time: Select 'h' for hours
- Function: Choose your cost function (e.g., 't' for Tobler)
4 Run - The output will show the boundary polygon representing the area reachable within 1 hour of walking
movecorr - Least-Cost Corridors
Description
Calculates the least-cost corridor between two point locations. A corridor shows not just the single optimal path, but a zone of similarly low-cost routes between two points. This is useful for understanding where movement was most likely concentrated.
Use Cases
- Identify natural transportation corridors
- Model ancient road development zones
- Plan hiking trails or conservation corridors
- Understand why certain routes became historically important
Tutorial: Find Natural Corridor Between Two Cities
1 Prepare two point layers: Origin and Destination
2 Click "movecorr"
3 Configure:
- Origin: Your starting point
- Destination: Your end point
- Corridor_Perc: Percentage above minimum cost to include (e.g., 10%)
4 Interpret results:
- Least-Cost Corridor raster: Lower values = more optimal routes
- LCP line: The single optimal path
Tip: A narrow corridor indicates terrain constraints forcing movement through specific areas. Wide corridors suggest multiple viable routes.
movealloc - Cost Allocation Analysis
Description
Performs cost allocation analysis: given multiple origin locations, each cell in the landscape is assigned to its nearest origin based on walking cost (not Euclidean distance). This creates "cost-based Voronoi polygons".
Use Cases
- Define service areas for multiple facilities
- Model territorial divisions between settlements
- Analyze resource catchment areas
- Determine which settlement would have controlled which lands
Tutorial: Determine Settlement Territories
1 Create a point layer with all settlement locations
2 Click "movealloc"
3 Set parameters:
- Origin: Your settlements point layer
- Function: Choose appropriate cost function
4 Output interpretation: Each raster cell value indicates which origin point (by index) it is closest to in terms of walking cost
movecomp - Compare Cost Functions
Description
Calculates least-cost paths using different cost functions and displays them together for comparison. This helps understand how different movement assumptions (pedestrian vs. pack animal vs. wheeled vehicle) affect optimal route selection.
Use Cases
- Compare pedestrian vs. wheeled transport routes
- Test sensitivity of paths to cost function choice
- Model how different transport technologies affect route networks
- Academic comparison of cost function models
Tutorial: Compare Pedestrian vs. Cart Routes
1 Click "movecomp"
2 Configure:
- Origin/Destination: Your two points
- Choice1: 't' (Tobler's pedestrian function)
- Choice2: 'wcs' (wheeled vehicle function)
- Add more choices if needed
3 Analyze: Paths that diverge significantly indicate where terrain impacts different transport modes differently
movenetw - Least-Cost Path Networks
Description
Creates a network of least-cost paths connecting multiple locations. Can create either an "all-pairs" network (connecting every point to every other point) or a "nearest neighbor" network (connecting each point only to its nearest neighbors).
Use Cases
- Model ancient road or trade networks
- Identify probable communication routes between sites
- Analyze settlement connectivity
- Create LCP density maps to identify major corridors
Tutorial: Create Trade Network Between Archaeological Sites
1 Create point layer with all site locations
2 Click "movenetw"
3 Configure:
- Origin: Your sites layer
- Network_type: 'allpairs' for complete network or 'neigh' for nearest-neighbor only
- LCP_DENS: TRUE to generate path density raster
4 Outputs:
- LCPs_netw: All individual paths
- LCPs_netw_merged: Merged/simplified network
- Density raster: Shows where paths concentrate (potential major routes)
Tip: The LCP density raster can reveal "natural highways" - areas where terrain funnels movement regardless of specific origin/destination.
moverank - Rank Destinations by Cost
Description
Calculates the least-cost path from an origin to a destination AND computes sub-optimal alternative paths (the 2nd, 3rd, 4th... best paths). This helps understand not just the optimal route but also viable alternatives.
Use Cases
- Identify alternative routes when primary route is blocked
- Understand route redundancy in transportation systems
- Model strategic choices in path selection
- Rank multiple destinations by accessibility
Tutorial: Find Primary and Alternative Routes
1 Click "moverank"
2 Configure:
- Origin: Starting point
- Destination: End point
- LCPN: Number of alternative paths to calculate (e.g., 5)
- Use_Corridor: TRUE to also calculate corridor
3 Interpret: Paths are ranked by cost, with attributes showing the cost of each alternative
Cost Functions Reference
Walking Time Functions
| Code | Function Name | Description |
t | Tobler (on-path) | Classic Tobler hiking function for established paths. Most commonly used. |
tofp | Tobler (off-path) | Modified for cross-country walking without paths. Slower than on-path. |
mp | Marquez-Perez et al. | Modified Tobler function with different slope penalty. |
icmonp | Irmischer-Clarke (male, on-path) | Empirically derived from GPS tracking of male hikers. |
icmoffp | Irmischer-Clarke (male, off-path) | Male hikers walking off established trails. |
icfonp | Irmischer-Clarke (female, on-path) | Empirically derived from GPS tracking of female hikers. |
icfoffp | Irmischer-Clarke (female, off-path) | Female hikers walking off established trails. |
ug | Uriarte González | Function developed for Spanish archaeological contexts. |
ma | Marín Arroyo | Optimized for mountainous terrain analysis. |
alb | Alberti | Modified Tobler for pastoral foraging excursions. |
gkrs | Garmy-Kaddouri-Rozenblat-Schneider | French archaeological research function. |
r | Rees | Alternative empirical hiking function. |
ks | Kondo-Seino | Japanese terrain analysis function. |
trp | Tripcevich | Function for high-altitude Andean contexts. |
Wheeled Vehicle Function
| Code | Function Name | Description |
wcs | Wheeled-vehicle critical slope | Models slope limitations for carts/wagons. Uses Critical_Slope parameter. |
Abstract Cost Functions
| Code | Function Name | Description |
ree | Relative energetic expenditure | Dimensionless relative cost based on slope. |
b | Bellavia | Alternative abstract cost model. |
e | Eastman | Eastman's cost function. |
Metabolic Energy Functions
| Code | Function Name | Description |
p | Pandolf et al. | Metabolic cost considering body weight and load. Uses W, L parameters. |
pcf | Pandolf (corrected) | Pandolf with correction factor for downhill movement. |
m | Minetti et al. | Energy expenditure from biomechanics research. |
hrz | Herzog | Herzog's metabolic model. |
vl | Van Leusen | Archaeological energy cost model. |
ls | Llobera-Sluckin | Theoretical physics-based energy model. |
a | Ardigo et al. | Sports science metabolic function. |
h | Hare | Hare's energy expenditure model. |
Parameters Reference
Input Parameters
CRS: Coordinate Reference System for all outputs. Must match your input data.
DTM: Digital Terrain Model raster. Elevation values should be in meters.
Area_of_interest: Polygon layer defining study area. If used instead of DTM, elevation data is downloaded automatically.
Origin: Point layer with starting location(s).
Destination: Point layer with target location(s).
Barrier: Optional line/polygon layer representing impassable or high-cost areas.
Movement Parameters
Move: Cell connectivity - how many directions to consider:
- 4: Rook's case (N,S,E,W only) - fastest but least accurate
- 8: Queen's case (includes diagonals) - good balance
- 16: Knight moves + queen (default) - most accurate paths
Function: Cost function to use (see tables above).
Time: Output time unit - 'h' for hours, 'm' for minutes.
Physical Parameters
Walker_Body_Weight: Walker's weight in kg (default: 70). Used by Pandolf and Van Leusen functions.
Carried_Load_Weight: Load weight in kg (default: 0). Affects metabolic cost.
Speed: Walking speed in m/s (default: 1.2). Base speed on flat terrain.
N: Terrain factor (default: 1). Higher values = more difficult terrain (mud, sand, etc.).
Critical_Slope: Maximum slope % for wheeled vehicles (default: 10). Typically 8-16%.
Advanced Parameters
Cognitive_Slope: TRUE/FALSE - use perceptual slope instead of actual slope. Humans perceive slopes as steeper than they are.
IrregularDTM: TRUE/FALSE - set TRUE if DTM has irregular edges (coastlines, etc.).
PlotBarrier: TRUE/FALSE - display barrier on output plots.
Field: Conductance value for barrier (0 = impassable, 1 = no effect).
Zoom_Level: Resolution for online elevation data (0-15, default: 9). Higher = more detail but slower.
Troubleshooting
Common Issues
- dgCMatrix error: Update the movecost R package to version 2.1 or higher. The plugin now does this automatically.
- R not found: Check Processing > Options > R settings and verify R installation path.
- Scripts not appearing: Click "Add R Scripts" button to copy scripts to QGIS.
- CRS mismatch: Ensure all input layers have the same CRS as the one selected in the dialog.
Credits & References
QGIS Plugin: Enzo Cocca (adArte srl) - enzo.ccc@gmail.com
R Package (movecost): Gianmarco Alberti
Repository: github.com/enzococca/movecost
R Package Documentation: CRAN movecost page
Key References
- Tobler W. (1993). Three presentations on geographical analysis and modeling.
- Alberti G. (2019). movecost: An R package for calculating accumulated slope-dependent cost.
- Herzog I. (2014). Least-cost paths – some methodological issues.
- Pandolf et al. (1977). Predicting energy expenditure with loads while standing or walking.