linref-gInterpolate: Interpolate Points along Line Geometry

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Return points at specified distances along a line.

Usage

1
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

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

Example output

rgeos version: 0.3-23, (SVN revision 546)
 GEOS runtime version: 3.4.2-CAPI-1.8.2 r3921 
 Linking to sp version: 1.2-3 
 Polygon checking: 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 

rgeos documentation built on Dec. 15, 2021, 1:07 a.m.