Spatial Position Models

Computes spatial position models: the potential model as defined by Stewart (1941) and catchment areas as defined by Reilly (1931) or Huff (1964) .


Stewart Potentials

R package for computing spatial position models:

  • Stewart potentials
  • Reilly catchment areas
  • Huff catchment areas



Stable version


From GitHub

Development version / unstable


From Archive

Version 2.0.0 of the package is a major release that should not break old code.
Anyway, in case of problem you can use these lines to get a previous version of the package.

packageurl <- ""
install.packages(packageurl, repos=NULL, type="source")


Vignettes contain commented scripts on how to use SpatialPostion.

  • Introduction to the SpatialPosition package :
vignette(topic = "SpatialPosition")
  • Stewart Potentials: a Use Case :
vignette(topic = "StewartExample")


SpatialPosition version 2.0.0 (Release date: 2019-05-10)

Major changes:

  • sf and sp objects are allowed as input and output (use returnclass = "sf" for sf output).
  • functions use sf for spatial computation.
  • rasterToContourPoly() (based on rgeos & sp) is deprecated in favor of isopoly() (based on isoband and sf).
  • bug fix in smoothy for some computations with NAs.
  • addition of a dataset hospital, with hospital points and capacity and Paris polygon.
  • suppression of the QGIS vignette, irrelevant in regard to QGIS v3, and not really specific to SpatialPosition

SpatialPosition version 1.2.0 (Release date: 2017-09-06)

Major changes:

  • Introduce mcStewart to compute stewart potentiels using parallel processing
  • Introduce smoothy to compute distance weighted mean.
  • Introduce a vignette on how to SpatialPosition with QGIS.

Minor changes:

  • (Re)introduce a longlat param in stewart, mcStewart, huff and reilly to select between eucliean and great circles distances.
  • Add a bypassctrl param in stewart, huff and reilly to allow computations on large datasets
  • More points in the default mask of raster poly
  • Rewrite of CreateGrid and rasterToContourPoly functions

SpatialPosition version 1.1.1 (Release date: 2016-06-07)

Minor changes:

  • Check mask size and validity in ratserToContourPoly
  • Better SpatialPolygonsDataFrame output in rasterToContourPoly
  • Default distance computation is in meters using the Great Circle distance (WGS84 ellipsoid) method.

SpatialPosition version 1.1 (Release date: 2016-03-18)

Major changes:

  • Introduce the quickStewart function that outputs stewart contour polygons easily. Ratio of potentials are allowed.
  • Introduce rasterToContourPoly to replace contourStewart.
  • contourStewart is now deprecated. Use rasterToContour from raster to output contour lines and rasterToContourPoly from SpatialPosition to output polygons.

Minor changes:

  • A resolution is set by default in CreateGrid.
  • Vignettes are updated to reflect major changes.

SpatialPosition version 1.0 (Release date: 2015-11-30)

Major changes:

  • Better code for contourStewart.
  • Better legend for plotStewart
  • New vignette 'Stewart Potentials: a Use Case'.

Minor changes:

  • Minor changes in documentation and vignette.
  • Add 'cartography' in suggested packages

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


2.1.1 by Timothée Giraud, 6 months ago

Report a bug at

Browse source code at

Authors: Timothée Giraud [cre, aut] , Hadrien Commenges [aut] , Joël Boulier [ctb]

Documentation:   PDF Manual  

Task views: Analysis of Spatial Data

GPL-3 license

Imports sf, sp, grDevices, graphics, methods, isoband, raster

Suggests lwgeom, parallel, doParallel, foreach, cartography, knitr, rmarkdown

Suggested by cartography.

See at CRAN