point.coverage: Spatial coverages of stay points.

View source: R/data_quality.R

point.coverageR Documentation

Spatial coverages of stay points.

Description

Calculate the spatial coverage of each data point by employing the Voronoi tesselation (with deldir::deldir). The spatial area is calculated in a Euclidean space. Thus the user should convert long/lat data into Euclidean coordinates before passing into the function.

Usage

point.coverage(x, y, type = "lonlat")

Arguments

x, y

the coordinates of all (unique) stay points in Euclidean space

type

the type of coordinate system: c('lonlat', 'xy')

Value

a data.frame with four columns:

x,y input stay points

area the vector of spatial area (km^2) of each mosaic in Voronoi diagram

area.r the normalized ratio of log(area).

Examples

## Long/lat points
head(point.coverage(movement$lon, movement$lat, type='lonlat'))

## Euclidean points
ii <- lonlat2xy(movement$lon, movement$lat)
head(point.coverage(ii$x, ii$y, type='xy'))

caesar0301/movr documentation built on June 18, 2022, 2:37 a.m.