bg_intersects.generic: Test whether two BoostObjects intersect

Description Usage Arguments Value Examples

Description

Tests whether two BoostObjects intersect (element-wise).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
bg_intersects(obj1, obj2)

## S4 method for signature 'BoostMultiPolygons,BoostBoxGrid'
bg_intersects(obj1, obj2)

## S4 method for signature 'BoostMultiLines,BoostBoxGrid'
bg_intersects(obj1, obj2)

## S4 method for signature 'BoostMultiPolygons,BoostPointGrid'
bg_intersects(obj1, obj2)

## S4 method for signature 'BoostMultiPolygons,BoostGeometries'
bg_intersects(obj1, obj2)

## S4 method for signature 'BoostMultiLines,BoostGeometries'
bg_intersects(obj1, obj2)

## S4 method for signature 'BoostMultiPoints,BoostGeometries'
bg_intersects(obj1, obj2)

Arguments

obj1

A BoostObject.

obj2

A BoostObject.

Value

A list, with list element i an integer vector with the indices j for which intersects(x[i],y[j]) is TRUE.

Examples

1
2
3
4
5
6
pts = boost(sf::st_sfc(sf::st_point(c(.5,.5)),
sf::st_point(c(1.5, 1.5)),
sf::st_point(c(2.5, 2.5))))
pol = boost(sf::st_sfc(sf::st_polygon(
list(rbind(c(0,0), c(2,0), c(2,2), c(0,2), c(0,0))))))
bg_intersects(pol, pts)

hunzikp/velox documentation built on June 6, 2021, 2:40 a.m.