View source: R/ttt_compute_poisson_potential.R
compute_poisson_potential | R Documentation |
Compute the attractivity potential on a grid from balance value on polygon following the method of Tobler.
TTT equivalent of the potflow program of Waldo Tobler
POTENTIAL FIELD FROM DATA GIVEN BY POLYGONS CONVERTED
TO A LATTICE USING THE POLYGRID PROGRAM.
COMPUTED AS THE SOLUTION TO THE POISSON EQUATION
WITH BOUNDARY CONDITION DZ/DN=0.
SUMMER 1978, REVISED, CONVERTED TO BASIC, SPRING 1994. Rev 6/8/98
poisson.potential
returns an sf
compute_poisson_potential( xsf, varname = "delta", method = "jacobi", nb_it = 1000, cellsize = sqrt((sf::st_bbox(xsf)[3] - sf::st_bbox(xsf)[1]) * (sf::st_bbox(xsf)[4] - sf::st_bbox(xsf)[2])/2500) )
xsf |
an sf data.frame of polygons |
varname |
name of the feature where the balance of each polygons are stored |
method |
resolution method for poisson equation either jacobi or solve |
nb_it |
number of iteration for jacobi resolution |
cellsize |
size of the |
an sf data.frame with
data(dollars) dollars$polygones$delta = rowSums(dollars$OD)-colSums(dollars$OD) pot=compute_poisson_potential(dollars$polygones)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.