geos_inner_join {geos} | R Documentation |
Generate inner join keys based on a GEOS predicate
Description
Experimental low-level spatial join infrastructure based on the
geos_basic_strtree()
.
Usage
geos_inner_join(
x,
y,
predicate = "intersects",
distance = NA,
suffix = c(".x", ".y")
)
geos_inner_join_keys(x, y, predicate = "intersects", distance = NA)
Arguments
x , y |
Geometry vectors with a |
predicate |
One of:
|
distance |
Passed to |
suffix |
A character vector of length 2 with suffixes for the left and right sides for output columns with duplicated names. |
Value
A data.frame with columns x and y corresponding to the 1-based
indices on pairs of x
and y
for which predicate
is TRUE.
Examples
x <- data.frame(
col_x = "a",
geometry = as_geos_geometry("POINT (10 10)")
)
y <- data.frame(
col_y = "a",
geometry = as_geos_geometry("POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))")
)
geos_inner_join(x, y, "intersects")
geos_inner_join_keys(
"POINT (5 5)",
"POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))",
"intersects"
)
[Package geos version 0.2.4 Index]