Learn R Programming

gdistance (version 1.6.5)

Distances and Routes on Geographical Grids

Description

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) . 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.

Copy Link

Version

Install

install.packages('gdistance')

Monthly Downloads

13,478

Version

1.6.5

License

GPL (>= 2)

Maintainer

Andrew Marx

Last Published

September 27th, 2025

Functions in gdistance (1.6.5)

geoCorrection

Geographic Correction
gdistance

Distances and Routes on Geographical Grids
pathInc

Incidence of paths from a common origin: overlap and non-overlap
overlap

Overlap and nonoverlap of trajectories
normalize

Normalize
shortestPath

Shortest path
sumReciprocal

Reciprocal of the sum of the reciprocals of conductance values in Transition* objects
raster,TransitionLayer-method

RasterLayer from TransitionLayer object
transition

Create an object of the class Transition
passage

Probability of passage
rSPDistance

Randomized shortest path distance
genDist

Genetic distances and coordinates of haplogroup R1b1b2 populations in Europe
Transition-classes

Transition classes
Summary-methods

Summary methods
adjacencyFromTransition

Adjacent cells
costDistance

Cost distance
Transition-extract-replace

Extracting and replacing: class Transition
Transition-slots

Extract or change elements of Transition* objects
commuteDistance

Commute-time distance
ArithMath-methods

Arithmetic and mathematical operations with objects of Transition* classes
accCost

Accumulated Cost Surface
Coords class

Coords class