Learn R Programming

hydroloom (version 1.1.0)

st_compatibalize: Make Spatial Inputs Compatible

Description

makes sf1 compatible with sf2 by projecting into the projection of 2 and ensuring that the geometry columns are the same name.

Usage

st_compatibalize(sf1, sf2)

Value

sf1 transformed and renamed to be compatible with sf2

Arguments

sf1

sf data.frame

sf2

sf data.frame

Examples

Run this code

x <- sf::read_sf(system.file("extdata/new_hope.gpkg", package = "hydroloom"))

one <- dplyr::select(x)
two <- sf::st_transform(one, 5070)

attr(one, "sf_column") <- "geotest"
names(one)[names(one) == "geom"] <- "geotest"

st_compatibalize(one, two)

Run the code above in your browser using DataLab