strr_as_sf: Function to convert property tables to sf objects

View source: R/strr_as_sf.R

strr_as_sfR Documentation

Function to convert property tables to sf objects

Description

strr_as_sf is a convenience wrapper around st_as_sf for STR property tables.

Usage

strr_as_sf(
  property,
  CRS = 4326,
  longitude = "longitude",
  latitude = "latitude"
)

Arguments

property

A property table in standard UPGo format.

CRS

The EPSG code or proj4string character vector specifying a coordinate reference system into which to transform the table. The default is unprojected WGS 84 (EPSG 4326).

longitude

A character string naming the field supplying the longitude values of points.

latitude

A character string naming the field supplying the latitude values of points.

Details

A function for converting a raw property table into an sf object with point geometries. The function makes use of a pair of fields specifying longitude and latitude, and has the option to specify a destination CRS.

Value

An sf table with the longitude and latitude fields converted to a geometry field and all other fields returned unaltered.


UPGo-McGill/strr documentation built on Feb. 24, 2024, 6:15 p.m.