addMValues: Add M values to given feature

Description Usage Arguments Value Examples

View source: R/addMValues.R

Description

Add M values to a given linear feature and store them in the m-coordinate of the sf object. Returns the new sf object with added m-values. For more information on m-values and linear referencing see: http://desktop.arcgis.com/en/arcmap/10.3/guide-books/linear-referencing/what-is-linear-referencing.htm

Usage

1
addMValues(sfDataObject)

Arguments

sfDataObject

An sf object. Must be a LINESTRING, POLYGON, MULTIPOLYGON, or MULTILINESTRING

Value

Returns the new sfDataObject with added m-values. The class of the output is sf.

Examples

1
2
3
4
5
6
library(rLFT)
data("shpObject")
# Assign M Values to each vertex
mValues <- addMValues(shpObject)
print("M Values Added")
head(st_coordinates(mValues))

rLFT documentation built on Sept. 24, 2021, 9:07 a.m.