addMValues {rLFT}R Documentation

Add M values to given feature

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

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

library(rLFT)
data("shpObject")
# Assign M Values to each vertex
mValues <- addMValues(shpObject)
print("M Values Added")
head(st_coordinates(mValues))


[Package rLFT version 1.0.1 Index]