SimplifyLinearNetwork: Simplifies a linear network object by merging the edges that...

Description Usage Arguments Value Examples

View source: R/SimplifyLinearNetwork.R

Description

This algorithm attempts to automatically reduce a linear network's complexity without altering its basic geometric configuration. The main objective of the algorithm is to merge the pairs of edges of the network that are connected by a second-degree vertex (with only two incident edges) into only one edge. Equivalently, this action means to join two vertex of the network whose path of connection only passes through another vertex of the network.

Usage

1
SimplifyLinearNetwork(network, Angle = NULL, Length = NULL, M = NULL)

Arguments

network

- A linnet object representing a linear network structure

Angle

- An angle (in degrees, from 0 to 90) to adjust the level of simplification performed by the algorithm

Length

- A length (in meters) to adjust the level of simplification performed by the algorithm

M

- A k x 2 matrix that represents a combined effect for the Angle and Length parameters. First column represents a partition of the length space, whereas the second contains the angles considered in the simplification procedure when the lengths of both edges meeting in a second-degree vertex are below the threshold indicated in the first column

Value

Returns a simplification of the linear network passed as an input (linnet class)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(SpNetPrep)
library(spatstat)
library(sp)
library(raster)
library(maptools)
network <- as.linnet(SampleNetwork)
Angle <- 15
Length <- 30
simplified_network_1 <- SimplifyLinearNetwork(network,Angle=Angle,Length=Length)
## Not run: 
M <- matrix(c(10,60,40,25),nrow=2)
simplified_network_2 <- SimplifyLinearNetwork(network,M=M)

## End(Not run)

albrizre/SpNetPrep documentation built on Sept. 28, 2020, 8:56 p.m.