gdistance: Distances and Routes on Geographical Grids

Provides classes and functions to calculate various distance measures and routes in heterogeneous geographic spaces represented as grids. The package implements measures to model dispersal histories first presented by van Etten and Hijmans (2010) <doi:10.1371/journal.pone.0012060>. Least-cost distances as well as more complex distances based on (constrained) random walks can be calculated. The distances implemented in the package are used in geographical genetics, accessibility indicators, and may also have applications in other fields of geospatial analysis.

Version: 1.6.4
Depends: R (≥ 3.2.0), raster (≥ 1.9-19), methods, igraph (≥ 0.7.0), Matrix
Imports: sp, stats, terra
Suggests: knitr, markdown, rmarkdown, testthat (≥ 2.1.0)
Published: 2023-06-19
DOI: 10.32614/CRAN.package.gdistance
Author: Jacob van Etten ORCID iD [aut], KauĂȘ de Sousa ORCID iD [ctb], Andrew Marx ORCID iD [cre, ctb]
Maintainer: Andrew Marx <ajm.rpackages at>
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
NeedsCompilation: no
Citation: gdistance citation info
Materials: NEWS
In views: Spatial
CRAN checks: gdistance results


Reference manual: gdistance.pdf
Vignettes: gdistance


Package source: gdistance_1.6.4.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
macOS binaries: r-release (arm64): gdistance_1.6.4.tgz, r-oldrel (arm64): gdistance_1.6.4.tgz, r-release (x86_64): gdistance_1.6.4.tgz, r-oldrel (x86_64): gdistance_1.6.4.tgz
Old sources: gdistance archive

Reverse dependencies:

Reverse depends: ctmcmove, ipdw
Reverse imports: gen3sis, graph4lg, marmap, memgene, movecost, PopGenReport, pressuRe, red, topoDistance, wingen
Reverse suggests: actel, dartR, dartR.base, dartR.spatial, phylin, roads, samc, secr


Please use the canonical form to link to this page.