createSF_points: Create an 'sf' (simple features) dataset with point...

View source: R/createSF_points.R

createSF_pointsR Documentation

Create an sf (simple features) dataset with point geometries

Description

Function to create an sf (simple features) dataset with point geometries.

Usage

createSF_points(
  dfr,
  xCol = "longitude",
  yCol = "latitude",
  crs = get_crs(4326),
  wrapDateline = FALSE
)

Arguments

dfr
  • dataframe with columns for x,y coordinates for points

xCol
  • name of column with x coordinates (e.g., longitudes)

yCol
  • name of column with y coordinates (e.g., latitudes)

crs
  • a coordinate reference system object convertible to a sf::crs object using get_crs

wrapDateline
  • flag (T/F) to use 0 to 360 rather than -180 to 180 range for longitudes

Details

Uses packages tibble, sf, dplyr.

Value

an sf dataframe: dfr with "geom" column appended


wStockhausen/wtsGIS documentation built on Aug. 23, 2023, 2:31 a.m.