linref-gInterpolate.Rd
Return points at specified distances along a line.
gInterpolate(spgeom, d, normalized = FALSE)
SpatialLines or SpatialLinesDataFrame object
Numeric vector specifying the distance along the line geometry
Logical determining if normalized distances should be used
SpatialPoints object
If normalized=TRUE
, the distances will be interpreted
as fractions of the line length.
gInterpolate
gInterpolate(readWKT("LINESTRING(25 50, 100 125, 150 190)"),
d=seq(0, 1, by = 0.2), normalized = TRUE)
#> SpatialPoints:
#> x y
#> 1 25.00000 50.00000
#> 2 51.59741 76.59741
#> 3 78.19483 103.19483
#> 4 104.13216 130.37181
#> 5 127.06608 160.18591
#> 6 150.00000 190.00000
#> Coordinate Reference System (CRS) arguments: NA