Return distances along geometry to points nearest the specified points.
gProject(spgeom, sppoint, normalized = FALSE)
SpatialLines or SpatialLinesDataFrame object
SpatialPoints or SpatialPointsDataFrame object
Logical determining if normalized distances should be used
a numeric vector containing the distances along the line to points nearest to the specified points
normalized=TRUE, distances normalized to the length
of the geometry are returned, i.e., values between 0 and 1.