1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s2-bounds.R
\name{s2_bounds_cap}
\alias{s2_bounds_cap}
\alias{s2_bounds_rect}
\title{Compute feature-wise and aggregate bounds}
\usage{
s2_bounds_cap(x)
s2_bounds_rect(x)
}
\arguments{
\item{x}{An \code{\link[=s2_geography]{s2_geography()}} vector.}
}
\value{
Both functions return a \code{data.frame}:
\itemize{
\item \code{\link[=s2_bounds_rect]{s2_bounds_rect()}}: Columns \code{minlng}, \code{minlat}, \code{maxlng}, \code{maxlat} (degrees)
\item \code{\link[=s2_bounds_cap]{s2_bounds_cap()}}: Columns \code{lng}, \code{lat}, \code{angle} (degrees)
}
}
\description{
\code{\link[=s2_bounds_rect]{s2_bounds_rect()}} returns a bounding latitude-longitude
rectangle that contains the region; \code{\link[=s2_bounds_cap]{s2_bounds_cap()}} returns a bounding circle
represented by a centre point (lat, lng) and an angle. The bound may not be tight
for points, polylines and geometry collections. The rectangle returned may depend on
the order of points or polylines. \code{lng_lo} values larger than \code{lng_hi} indicate
regions that span the antimeridian, see the Fiji example.
}
\examples{
s2_bounds_cap(s2_data_countries("Antarctica"))
s2_bounds_cap(s2_data_countries("Netherlands"))
s2_bounds_cap(s2_data_countries("Fiji"))
s2_bounds_rect(s2_data_countries("Antarctica"))
s2_bounds_rect(s2_data_countries("Netherlands"))
s2_bounds_rect(s2_data_countries("Fiji"))
}
|