Learn R Programming

spNetwork (version 0.4.4.3)

build_quadtree: Build a quadtree

Description

Generate a quadtree object from package SearchTrees, useful to speed up spatial requesting (INTERNAL).

Usage

build_quadtree(data)

Value

a spatial_index object (pointer to a c++ instance)

Arguments

data

a feature collection of linestrings or a feature collection of points

Examples

Run this code
data(mtl_network)
tree <- build_quadtree(mtl_network)
buff <- sf::st_buffer(mtl_network[55,], 50)
selection <- spatial_request(buff, tree, mtl_network)

Run the code above in your browser using DataLab