sort_points: Function to sort a set of points/coordinates in a clockwise...

View source: R/sort_points.R

sort_pointsR Documentation

Function to sort a set of points/coordinates in a clockwise or anti-clockwise direction.

Description

sort_points can be useful for creating spatial lines or polygons from points.

Usage

sort_points(df, y = "latitude", x = "longitude", clockwise = TRUE)

Arguments

df

Data frame containing y and x points.

y

Name of y variable in df.

x

Name of x variable in df.

clockwise

Should the points be arranged in a clockwise direction? If FALSE, the order will be an anti-clockwise direction.

Author(s)

Stuart K. Grange


skgrange/gissr documentation built on June 20, 2024, 12:02 a.m.