Learn R Programming

spNetwork (version 0.1.1)

lines_center: Center points of lines

Description

Generate a SpatialPointsDataFrame with line center points. The points are located at center of the line based on the length of the line.

Usage

lines_center(lines)

Arguments

lines

The SpatialLinesDataframe to use

Value

An object of class SpatialPointsDataFrame (package sp)

Examples

Run this code
# NOT RUN {
networkgpkg <- system.file("extdata", "networks.gpkg", package = "spNetwork", mustWork = TRUE)
mtl_network <- rgdal::readOGR(networkgpkg,layer="mtl_network", verbose=FALSE)
centers <- lines_center(mtl_network)
# }

Run the code above in your browser using DataLab