aggregate_points {spNetwork}R Documentation

Events aggregation

Description

Function to aggregate points within a radius.

Usage

aggregate_points(points, maxdist, weight = "weight")

Arguments

points

The feature collection of points to contract (must have a weight column)

maxdist

The distance to use

weight

The name of the column to use as weight (default is "weight"). The values of the aggregated points for this column will be summed. For all the other columns, only the max value is retained.

Details

This function can be used to aggregate points within a radius. This is done by using the dbscan algorithm. This process is repeated until no more modification is applied.

Value

A new feature collection of points

Examples

data(bike_accidents)
bike_accidents$weight <- 1
agg_points <- aggregate_points(bike_accidents, 5)

[Package spNetwork version 0.4.3.8 Index]