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

View source: R/geo_projected.R

geo_lengthR Documentation

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

See Also

Other geo: bbox_scale(), bind_sf(), geo_bb_matrix(), geo_bb(), geo_buffer(), geo_projected(), geo_select_aeq(), quadrant()

Examples

lib_versions <- sf::sf_extSoftVersion()
lib_versions
if (lib_versions[3] >= "6.3.1") {
  geo_length(routes_fast_sf)
}

stplanr documentation built on Sept. 15, 2023, 9:07 a.m.