geos_project {geos} | R Documentation |
Linear referencing
Description
-
geos_project()
andgeos_project_normalized()
return the distance of pointgeom2
projected ongeom1
from the origin ofgeom1
, which must be a lineal geometry. -
geos_interpolate()
performs an inverse operation, returning the point alonggeom
representing the givendistance
from the origin along the geometry. -
_normalized()
variants use a distance normalized to thegeos_length()
of the geometry.
Usage
geos_project(geom1, geom2)
geos_project_normalized(geom1, geom2)
geos_interpolate(geom, distance)
geos_interpolate_normalized(geom, distance_normalized)
Arguments
geom1 , geom2 |
GEOS geometry vectors, recycled to a common length. |
geom |
|
distance |
Distance along the linestring to interpolate |
distance_normalized |
Distance along the linestring to interpolate relative to the length of the linestring. |
Examples
geos_interpolate("LINESTRING (0 0, 1 1)", 1)
geos_interpolate_normalized("LINESTRING (0 0, 1 1)", 1)
geos_project("LINESTRING (0 0, 10 10)", "POINT (5 5)")
geos_project_normalized("LINESTRING (0 0, 10 10)", "POINT (5 5)")
[Package geos version 0.2.4 Index]