File: s2_options.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 (109 lines) | stat: -rw-r--r-- 4,081 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s2-options.R
\name{s2_options}
\alias{s2_options}
\alias{s2_snap_identity}
\alias{s2_snap_level}
\alias{s2_snap_precision}
\alias{s2_snap_distance}
\title{Geography Operation Options}
\usage{
s2_options(
  model = NULL,
  snap = s2_snap_identity(),
  snap_radius = -1,
  duplicate_edges = FALSE,
  edge_type = "directed",
  validate = FALSE,
  polyline_type = "path",
  polyline_sibling_pairs = "keep",
  simplify_edge_chains = FALSE,
  split_crossing_edges = FALSE,
  idempotent = FALSE,
  dimensions = c("point", "polyline", "polygon")
)

s2_snap_identity()

s2_snap_level(level)

s2_snap_precision(precision)

s2_snap_distance(distance)
}
\arguments{
\item{model}{One of 'open', 'semi-open' (default for polygons),
or 'closed' (default for polylines). See section 'Model'}

\item{snap}{Use \code{s2_snap_identity()}, \code{s2_snap_distance()}, \code{s2_snap_level()},
or \code{s2_snap_precision()} to specify how or if coordinate rounding should
occur.}

\item{snap_radius}{As opposed to the snap function, which specifies
the maximum distance a vertex should move, the snap radius (in radians) sets
the minimum distance between vertices of the output that don't cause vertices
to move more than the distance specified by the snap function. This can be used
to simplify the result of a boolean operation. Use -1 to specify that any
minimum distance is acceptable.}

\item{duplicate_edges}{Use \code{TRUE} to keep duplicate edges (e.g., duplicate
points).}

\item{edge_type}{One of 'directed' (default) or 'undirected'.}

\item{validate}{Use \code{TRUE} to validate the result from the builder.}

\item{polyline_type}{One of 'path' (default) or 'walk'. If 'walk',
polylines that backtrack are preserved.}

\item{polyline_sibling_pairs}{One of 'discard' (default) or 'keep'.}

\item{simplify_edge_chains}{Use \code{TRUE} to remove vertices that are within
\code{snap_radius} of the original vertex.}

\item{split_crossing_edges}{Use \code{TRUE} to split crossing polyline edges
when creating geometries.}

\item{idempotent}{Use \code{FALSE} to apply snap even if snapping is not necessary
to satisfy vertex constraints.}

\item{dimensions}{A combination of 'point', 'polyline', and/or 'polygon'
that can used to constrain the output of \code{\link[=s2_rebuild]{s2_rebuild()}} or a
boolean operation.}

\item{level}{A value from 0 to 30 corresponding to the cell level
at which snapping should occur.}

\item{precision}{A number by which coordinates should be multiplied
before being rounded. Rounded to the nearest exponent of 10.}

\item{distance}{A distance (in radians) denoting the maximum
distance a vertex should move in the snapping process.}
}
\description{
These functions specify defaults for options used to perform operations
and construct geometries. These are used in predicates (e.g., \code{\link[=s2_intersects]{s2_intersects()}}),
and boolean operations (e.g., \code{\link[=s2_intersection]{s2_intersection()}}) to specify the model for
containment and how new geometries should be constructed.
}
\section{Model}{

The geometry model indicates whether or not a geometry includes its boundaries.
Boundaries of line geometries are its end points.
OPEN geometries do not contain their boundary (\code{model = "open"}); CLOSED
geometries (\code{model = "closed"}) contain their boundary; SEMI-OPEN geometries
(\code{model = "semi-open"}) contain half of their boundaries, such that when two polygons
do not overlap or two lines do not cross, no point exist that belong to
more than one of the geometries. (This latter form, half-closed, is
not present in the OpenGIS "simple feature access" (SFA) standard nor DE9-IM on
which that is based). The default values for \code{\link[=s2_contains]{s2_contains()}} (open)
and covers/covered_by (closed) correspond to the SFA standard specification
of these operators.
}

\examples{
# use s2_options() to specify containment models, snap level
# layer creation options, and builder options
s2_options(model = "closed", snap = s2_snap_level(30))

}