Learn R Programming

stplanr (version 0.5.0)

geo_length: Calculate line length of line with geographic or projected CRS

Description

Takes a line (represented in sf or sp classes) and returns a numeric value representing distance in meters.

Usage

geo_length(shp)

Arguments

shp

A spatial line object

Examples

Run this code
# NOT RUN {
geo_length(routes_fast)
geo_length(routes_fast_sf)
# }

Run the code above in your browser using DataLab