Learn R Programming

nhdplusTools (version 0.7.1)

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)

Arguments

sf1

sf data.frame

sf2

sf data.frame

Examples

Run this code

source(system.file("extdata", "sample_flines.R", package = "nhdplusTools"))

(one <- dplyr::select(sample_flines))
(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