revSGe: Reverse Lines in a SpatialGraph

View source: R/revSGe.R

revSGeR Documentation

Reverse Lines in a SpatialGraph

Description

A SpatialGraph contains a SpatialLinesDataFrame, describing the network topology. The input eID indicates the identifiers of a set of lines (edges) in the network to be reversed. Note eID does not refer to the line index within SG@e, but to the Feature Identifiers, as extracted from row.names(SG@e@data)

Usage

revSGe(SG, eID)

Arguments

SG

SpatialGraph

eID

vector of Feature Identifiers for lines to be reversed

Details

Note eID does not refer to the line index within SG@e, but to the Feature Identifiers, as extracted from row.names(SG@e@data). Accordingly to the reversed coordiantes, the corresponding fields ["v0","v1"], are interchanged.

Value

A SpatialGraph


SpatialGraph documentation built on Sept. 28, 2023, 5:08 p.m.