Defining a CRS for Tabular Data

library(sf)
# Read sequoia point data from comma separated file
segi <- read.csv("data/source/segi/SEGI_OTI_2023_public_epsg26911.csv")
head(segi)
# Check out the info for epsg 26911 which is NAD83 UTM Zone 11 projection
st_crs("EPSG:26911")

# Convert the basic data.frame to an sf object by specifying the coordinate columns and crs
?st_as_sf
segi_sf <- st_as_sf(segi, coords = c("UTM_East", "UTM_North"), crs = "EPSG:26911")
head(segi_sf)
# The crs can also be assigned with st_crs()
segi_sf <- st_as_sf(segi, coords = c("UTM_East", "UTM_North"))
segi_sf
st_crs(segi_sf) <- "EPSG:26911"
# IF your data has a wkt geometry field you can use that to provide the spatial information to sf.
segi_sf <- st_as_sf(segi, wkt = "wkt_geom", crs = "EPSG:26911")