18std::uint32_t
hilbert(std::uint32_t x, std::uint32_t y);
25std::uint32_t
hilbert_bbox(
const NodeItem& r, std::uint32_t hilbert_max,
const NodeItem& extent);
30void hilbert_sort(std::vector<NodeItem>& items,
const NodeItem& extent);
37NodeItem
calc_extent(
const std::vector<NodeItem>& nodes);
49std::vector<NodeItem>
build_packed_rtree(
const std::vector<NodeItem>& nodes,
const NodeItem& extent,
void hilbert_sort(std::vector< NodeItem > &items, const NodeItem &extent)
Sorts items in place by descending Hilbert index (the item furthest along the curve first) – a STABLE...
std::vector< std::uint8_t > encode_packed_rtree(const std::vector< NodeItem > &tree)
Serializes every node in tree (as returned by build_packed_rtree) in array order, 40 bytes each.
std::vector< NodeItem > build_packed_rtree(const std::vector< NodeItem > &nodes, const NodeItem &extent, std::uint16_t node_size)
Builds the full flat packed-R-tree node array (leaves first in nodes's own order at the array's tail ...
NodeItem calc_extent(const std::vector< NodeItem > &nodes)
The bbox union of every item, via repeated NodeItem::expand starting from NodeItem::empty(0).
std::uint32_t hilbert_bbox(const NodeItem &r, std::uint32_t hilbert_max, const NodeItem &extent)
A NodeItem's Hilbert index: its bbox center, scaled into [0, hilbert_max] against extent,...
std::uint32_t hilbert(std::uint32_t x, std::uint32_t y)
The Hilbert curve index of point (x, y) on a 65536x65536 grid (16 bits per axis).