Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

linref-gInterpolate

Interpolate Points along Line Geometry


Description

Return points at specified distances along a line.

Usage

gInterpolate(spgeom, d, normalized = FALSE)

Arguments

spgeom

SpatialLines or SpatialLinesDataFrame object

d

Numeric vector specifying the distance along the line geometry

normalized

Logical determining if normalized distances should be used

Details

If normalized=TRUE, the distances will be interpreted as fractions of the line length.

Value

SpatialPoints object

Author(s)

Rainer Stuetz

See Also

gInterpolate

Examples

gInterpolate(readWKT("LINESTRING(25 50, 100 125, 150 190)"),
             d=seq(0, 1, by = 0.2), normalized = TRUE)

rgeos

Interface to Geometry Engine - Open Source ('GEOS')

v0.5-5
GPL (>= 2)
Authors
Roger Bivand [cre, aut] (<https://orcid.org/0000-0003-2392-6140>), Colin Rundel [aut], Edzer Pebesma [ctb], Rainer Stuetz [ctb], Karl Ove Hufthammer [ctb], Patrick Giraudoux [ctb], Martin Davis [cph, ctb], Sandro Santilli [cph, ctb]
Initial release
2020-09-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.