File: as_s2_geography.Rd

package info (click to toggle)
r-cran-s2 1.1.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,540 kB
  • sloc: cpp: 124,506; ansic: 2,639; pascal: 1,495; python: 354; sh: 139; makefile: 2
file content (74 lines) | stat: -rw-r--r-- 2,560 bytes parent folder | download | duplicates (3)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s2-geography.R
\name{as_s2_geography}
\alias{as_s2_geography}
\alias{s2_geography}
\alias{as_s2_geography.s2_geography}
\alias{as_s2_geography.wk_xy}
\alias{as_s2_geography.wk_wkb}
\alias{as_s2_geography.WKB}
\alias{as_s2_geography.blob}
\alias{as_s2_geography.wk_wkt}
\alias{as_s2_geography.character}
\alias{as_s2_geography.logical}
\alias{as_wkb.s2_geography}
\alias{as_wkt.s2_geography}
\title{Create an S2 Geography Vector}
\usage{
as_s2_geography(x, ...)

s2_geography()

\method{as_s2_geography}{s2_geography}(x, ...)

\method{as_s2_geography}{wk_xy}(x, ...)

\method{as_s2_geography}{wk_wkb}(x, ..., oriented = FALSE, check = TRUE)

\method{as_s2_geography}{WKB}(x, ..., oriented = FALSE, check = TRUE)

\method{as_s2_geography}{blob}(x, ..., oriented = FALSE, check = TRUE)

\method{as_s2_geography}{wk_wkt}(x, ..., oriented = FALSE, check = TRUE)

\method{as_s2_geography}{character}(x, ..., oriented = FALSE, check = TRUE)

\method{as_s2_geography}{logical}(x, ...)

\method{as_wkb}{s2_geography}(x, ...)

\method{as_wkt}{s2_geography}(x, ...)
}
\arguments{
\item{x}{An object that can be converted to an s2_geography vector}

\item{...}{Unused}

\item{oriented}{TRUE if polygon ring directions are known to be correct
(i.e., exterior rings are defined counter clockwise and interior
rings are defined clockwise).}

\item{check}{Use \code{check = FALSE} to skip error on invalid geometries}
}
\value{
An object with class s2_geography
}
\description{
Geography vectors are arrays of points, lines, polygons, and/or collections
of these. Geography vectors assume coordinates are longitude and latitude
on a perfect sphere.
}
\details{
The coercion function \code{\link[=as_s2_geography]{as_s2_geography()}} is used to wrap the input
of most functions in the s2 package so that you can use other objects with
an unambiguious interpretation as a geography vector. Geography vectors
have a minimal \link[vctrs:vctrs-package]{vctrs} implementation, so you can
use these objects in tibble, dplyr, and other packages that use the vctrs
framework.
}
\seealso{
\code{\link[=s2_geog_from_wkb]{s2_geog_from_wkb()}}, \code{\link[=s2_geog_from_text]{s2_geog_from_text()}}, \code{\link[=s2_geog_point]{s2_geog_point()}},
\code{\link[=s2_make_line]{s2_make_line()}}, \code{\link[=s2_make_polygon]{s2_make_polygon()}} for other ways to
create geography vectors, and \code{\link[=s2_as_binary]{s2_as_binary()}} and \code{\link[=s2_as_text]{s2_as_text()}}
for other ways to export them.
}