Learn R Programming

geoprofiler (version 0.0.3)

profile_points: Profile End Point

Description

Create a end point along a profile line starting at a point with a defined direction and length.

Usage

profile_points(
  start,
  profile.azimuth,
  profile.length,
  crs = st_crs(start),
  return.sf = TRUE
)

Value

class depends on return.sf.

Arguments

start

sf point object.

profile.azimuth

numeric or units object. Direction of profile in degrees if numeric.

profile.length

numeric or units object.

crs

Coordinate reference system. Should be parsed by sf::st_crs().

return.sf

logical. Should the profile points be returned as a sf object (TRUE, the default) object or as a data.frame.

Examples

Run this code
p1 <- data.frame(lon = -90.8, lat = 48.6) |>
  sf::st_as_sf(coords = c("lon", "lat"), crs = "WGS84")
profile_points(p1,
  profile.azimuth = 135, profile.length = units::set_units(10, "km"),
  crs = sf::st_crs("EPSG:26915")
)

Run the code above in your browser using DataLab