localMax: localMax

Description Usage Arguments Details Value Author(s) Examples

View source: R/theoPath.R

Description

Local Centres of Infrastructure from Monument Location

Usage

1
localMax(df, r = 5000, sw = 10, pd = 500)

Arguments

df

data frame, containing coordinates of path associated features

r

numeric, sets the size of moving window and sigma in the used density function in meter, default = 5000

sw

numeric, value used for defining threshold for defining a local maximum. A higher value means more local maxima are stored, default = 10. It's suggested not to change this parameter and instead work with the size of the moving window!

pd

numeric, dimension of pixels for intermediate raster image of the used density function in meter, default = 500

Details

In absence of known contemporary nodes, like settlements, the density of monument locations can be used to reconstruct nodes of infrastructure. This function will use the Kernel Density Approach combined with a moving window, in order to detect nodes in areas with less monuments (from a global perspective).

Value

SpatialPointsDataFrame with coordinates of local maxima

Author(s)

Franziska Faupel <ffaupel@ufg.uni-kiel.de>

Oliver Nakoinz <oliver.nakoinz.i@gmail.com>

Hendrik Raese <h.raese@roots.uni-kiel.de>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
set.seed(123)

# Creating random test data 
testmatrix <- data.frame(
 x = abs(runif(100, 1000, 1500)), 
 y = abs(runif(100, 1000, 1500)))

pd=25
sw=10
r=100
maxima <- localMax(df=testmatrix, r=r, sw=sw, pd=pd)

# Plot the result
maxima <- data.frame(maxima)

ggplot2::ggplot() +
 ggplot2::geom_point(data= testmatrix, ggplot2::aes(x=x, y=y)) +
 ggplot2::geom_point(data=maxima, 
                     ggplot2::aes(x=mx, y=my, color="red"), 
                     shape=15, 
                     size=3, 
                     show.legend = FALSE)

ISAAKiel/pathARR documentation built on Sept. 10, 2021, 7:54 a.m.