
Convert Points to LINESTRING Geometries
points_to_line.RdConverts a set of ordered point coordinates into one or more LINESTRING geometries. If a grouping variable is provided, one LINESTRING is created for each group.
Arguments
- data
A data frame containing point coordinates.
- long
Character. Name of the longitude column.
- lat
Character. Name of the latitude column.
- id_field
Optional character. Name of the column used to group points into different LINESTRING geometries.
- sort_field
Optional character. Name of the column used to order points before creating the LINESTRING geometries.