RTreeQuery class

Class responsible for loading and querying R-trees.

This class handles loading R-trees from disk with configurable caching for efficient lookup of the nearest cell for a given position.

Constructors, destructors, conversion operators

RTreeQuery(RTreeHelpers::CoordinateSystem coordSys) explicit
Construct an RTreeQuery with a specific coordinate system.
~RTreeQuery() defaulted

Public functions

void load(const std::string& base_path, size_t cache_size = 262144)
Load an R-tree from disk with caching.
auto query_point(const Position& pos) const -> uint64_t
Query the nearest cell for a given position.

Function documentation

RTreeQuery::RTreeQuery(RTreeHelpers::CoordinateSystem coordSys) explicit

Construct an RTreeQuery with a specific coordinate system.

Parameters
coordSys The coordinate system used by this layer's cells

void RTreeQuery::load(const std::string& base_path, size_t cache_size = 262144)

Load an R-tree from disk with caching.

Parameters
base_path Path to the R-tree index file
cache_size Size of the cache in bytes (default: 256KB)

auto RTreeQuery::query_point(const Position& pos) const -> uint64_t

Query the nearest cell for a given position.

Parameters
pos The position to query
Returns Pointer to the nearest cell