R/s2.R

Defines functions as_s2_geography.sfnetwork

Documented in as_s2_geography.sfnetwork

#' s2 methods for sfnetworks
#'
#' @param x An object of class \code{\link{sfnetwork}}.
#' @param ... Arguments passed on the corresponding \code{s2} function.
#'
#' @name s2
as_s2_geography.sfnetwork = function(x, ...) {
  s2::as_s2_geography(st_geometry(x))
}

Try the sfnetworks package in your browser

Any scripts or data that you put into this service are public.

sfnetworks documentation built on March 18, 2022, 7:49 p.m.