View source: R/geos-binary-geometry.R
geos_intersection | R Documentation |
geos_intersection()
returns the set of points common to both x
and y
.
geos_difference()
returns the set of points from x
that are
not contained by y
.
geos_sym_difference()
returns the set of points that are not
common to x
and y
.
geos_union()
returns the set of points contained by either x
or y
.
geos_shared_paths()
returns a GEOMETRYCOLLECTION containing two
MULTILINESTRINGS: the first containing paths in the same direction,
the second containing common paths in the opposite direction.
geos_snap()
snaps the vertices of x
within tolerance
of y
to y
.
geos_intersection(geom1, geom2)
geos_difference(geom1, geom2)
geos_sym_difference(geom1, geom2)
geos_union(geom1, geom2)
geos_intersection_prec(geom1, geom2, grid_size)
geos_difference_prec(geom1, geom2, grid_size)
geos_sym_difference_prec(geom1, geom2, grid_size)
geos_union_prec(geom1, geom2, grid_size)
geos_shared_paths(geom1, geom2)
geos_snap(geom1, geom2, tolerance = .Machine$double.eps^2)
geos_clearance_line_between(geom1, geom2, prepare = FALSE)
geom1 , geom2 |
GEOS geometry vectors, recycled to a common length. |
grid_size |
For |
tolerance |
The maximum separation of vertices that should be considered equal. |
prepare |
Use prepared geometries to calculate clearance line |
A GEOS geometry vector along the recycled
length of geom1
and geom2
.
poly1 <- "POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))"
poly2 <- "POLYGON ((5 5, 5 15, 15 15, 15 5, 5 5))"
geos_intersection(poly1, poly2)
geos_difference(poly1, poly2)
geos_sym_difference(poly1, poly2)
geos_union(poly1, poly2)
line <- "LINESTRING (11 0, 11 10)"
geos_snap(poly1, line, tolerance = 2)
geos_shared_paths("LINESTRING (0 0, 1 1, 2 2)", "LINESTRING (3 3, 2 2, 1 1)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.