ps_coords_to_sfc: Convert point coordinates to sfc column.

View source: R/coords.R

ps_coords_to_sfcR Documentation

Convert point coordinates to sfc column.

Description

If sfc_name is the active then the new sfc column replaces it and becomes the active one.

Usage

ps_coords_to_sfc(
  x,
  coords = c("X", "Y"),
  crs = getOption("ps.crs", 4326),
  sfc_name = "geometry",
  activate = TRUE
)

Arguments

x

The object.

coords

A character vector of specifying the two columns with the point information.

crs

An integer with the EPSG code, or character with proj4string.

sfc_name

A string of the name of the sfc column to create.

activate

A flag indicating whether to activate the sfc.

Value

The modified object with the coordinates removed


poissonconsulting/poisspatial documentation built on Nov. 9, 2023, 10:09 a.m.