Fact-checked by Grok 2 weeks ago

Range searching

Range searching is a fundamental problem in that involves preprocessing a set of n points in d-dimensional to efficiently answer queries reporting all points (or their count) lying within a specified geometric range, such as an axis-aligned , halfspace, or . This preprocessing typically builds a that balances space usage, query time, and update capabilities, with the goal of optimizing performance for repeated queries on static or dynamic point sets. The problem arises in numerous applications, including geographic information systems for spatial queries, for rendering scenes, spatial databases for location-based services, and time-series databases for pattern detection. For instance, in , range searching supports path planning and by identifying obstacles within proximity ranges, while in , it aids in by querying image features within bounding regions. Its versatility stems from the fact that many geometric problems, such as nearest neighbor searches or intersection reporting, can be reduced to or formulated as range searching variants. Key data structures for orthogonal range searching in two or three dimensions include range trees, which achieve O(\log^d n + k) query time using O(n \log^{d-1} n) space in d dimensions, where k is the number of reported points; kd-trees, offering simpler O(\sqrt{n} + k) worst-case query time in fixed dimensions; and fractional cascading techniques to reduce logarithmic factors. In higher dimensions, trade-offs intensify due to the curse of dimensionality, leading to approximate methods or dimensionality reduction, such as random projections, that maintain near-linear space while approximating query results with high probability. Seminal results, like those establishing linear space lower bounds for any non-trivial query time, underscore the problem's theoretical depth and ongoing research into optimal structures.

Fundamentals

Definition and Motivation

Range searching is a fundamental problem in that involves preprocessing a set S of n geometric objects, such as points in d-dimensional , to efficient queries determining which objects from S intersect or lie within a given query range Q, where Q belongs to a specified family of ranges (e.g., axis-aligned rectangles or halfspaces). The goal is to construct a that allows answering such queries quickly, often by reporting all intersecting objects or counting their number, after an initial preprocessing phase. The motivation for range searching stems from the need to handle large datasets in high-dimensional spaces without resorting to exhaustive linear scans, which would be inefficient for repeated queries on the same data. This problem gained prominence in the as emerged, with early seminal works addressing orthogonal range queries in low dimensions to support applications in , geographic information systems, and optimization algorithms. For instance, preprocessing enables sublinear query times, making it essential for tasks involving massive data volumes where naive methods scale poorly. A practical example is querying a database of cities to find all locations within specified latitude and longitude bounds, such as identifying urban areas in a rectangular geographic for or applications. This avoids scanning the entire dataset each time and leverages preprocessing for rapid responses. Range searching problems vary in several ways, including whether the set S is static (fixed after preprocessing) or dynamic (supporting insertions and deletions), and whether queries report the full list of intersecting objects or merely count them. Orthogonal ranges, defined by axis-aligned boundaries, serve as a common starting point for many variants due to their simplicity in modeling multidimensional .

Basic Terminology

Range searching operates on a finite set S of n points in a d-dimensional \mathbb{R}^d, where the points represent the data to be queried. These point sets are embedded in multidimensional spaces, with the dimension d typically treated as a small constant (e.g., up to 10), though complexity grows rapidly with d. The simplest case occurs in one dimension (d=1), where points lie on a line and queries reduce to searches. A range query specifies a subset \gamma \subseteq \mathbb{R}^d, known as the query , which defines the geometric region of interest; common examples include axis-aligned boxes (products of intervals along each axis, such as rectangles in 2D) and simplices (convex hulls of d+1 affinely independent points). The output of a query on S \cap \gamma varies by type: reporting queries return the full list of points in the ; counting queries return only the |S \cap \gamma|; and emptiness queries determine whether S \cap \gamma is empty (yes/no). Range searching problems are classified by the nature of updates and query processing. In the static setting, the point set S is fixed after preprocessing, supporting only online queries; the dynamic setting allows insertions and deletions to S alongside queries. Queries are further distinguished as offline, where all queries are known in advance and can be processed together, or online, where queries arrive sequentially and must be answered immediately without knowledge of future ones. Performance in range searching is evaluated using preprocessing time and space to construct a , as well as query time. Preprocessing typically requires O(n \log n) time and O(n) space in low dimensions, while query time is often expressed as O(f(n) + k), where f(n) bounds the overhead independent of the output and k is the size of the reported result (e.g., k points for reporting).

Types of Range Queries

Orthogonal Range Queries

Orthogonal range queries, also known as axis-aligned or rectangular range queries, seek to identify all points from a given that lie within a specified aligned with the coordinate axes. In two dimensions, the query is defined by intervals [x₁, x₂] × [y₁, y₂], where points (p_x, p_y) satisfy x₁ ≤ p_x ≤ x₂ and y₁ ≤ p_y ≤ y₂; this extends naturally to d dimensions as the of d intervals forming a d-dimensional . These queries are foundational in geometric , enabling efficient retrieval of data within bounded regions without rotation or skew. Geometrically, orthogonal ranges possess convenient decomposition properties, such as partitioning the space into slabs—strips bounded by lines perpendicular to a single axis—or into grid-like cells via axis-aligned splits, which facilitate divide-and-conquer strategies for point location. In higher dimensions, however, these properties are undermined by the curse of dimensionality, where the exponential growth in the volume of the space (2^d for unit hypercubes) leads to sparse data distributions and in the number of potential subregions, severely impacting both preprocessing storage and query efficiency. This dimensionality challenge makes exact solutions increasingly impractical beyond moderate d, often necessitating approximations or techniques. Basic algorithms for orthogonal range queries begin with the naive , which linearly scans all n points in the and checks each against the query bounds, incurring O(n) query time regardless of output size. This approach requires no preprocessing but scales poorly for large . In the one-dimensional special case, points can be sorted in an array, allowing binary search to identify the start and end indices of the interval in O(log n) time, followed by sequential reporting of the k matching points in O(k) time, for a total of O(log n + k). Queries typically focus on reporting all points in the , though counting variants simply tally the size without . A practical example arises in database systems, where an orthogonal range query might retrieve employee records satisfying age ∈ [20, 40] and salary ∈ [$50,000, $100,000], modeling multidimensional selection on tabular data like personnel attributes.

Simplex and Halfspace Queries

Simplex range queries generalize orthogonal range searching by allowing queries defined by the intersection of a set of points with a simplex, which is the convex hull of d+1 affinely independent points in d-dimensional space \mathbb{R}^d. In two dimensions, for instance, a simplex corresponds to a triangular region bounded by three points. These queries are highly expressive, as any polyhedral region can be decomposed into a constant number of simplices, enabling the representation of complex linear boundaries that extend beyond axis-aligned boxes. Halfspace range queries, a foundational building block for simplices, involve reporting or counting points lying within a halfspace defined by a single linear inequality, such as ax_1 + by_1 + \cdots + dz_d \leq c in \mathbb{R}^d. A simplex can thus be viewed as the intersection of d+1 such halfspaces. Orthogonal range queries form a special case of halfspace queries where the bounding hyperplanes are axis-aligned, but simplex and halfspace queries accommodate oblique orientations, broadening applicability to scenarios with rotated or slanted boundaries. Compared to orthogonal queries, simplex and halfspace queries present greater computational challenges due to the lack of simple geometric alignments, leading to inherent trade-offs between storage and query time. Lower bounds establish that, for linear storage, the query time must be at least \Omega(n^{1-1/d}) in the worst case, reflecting the increased difficulty of partitioning without axis guidance. No achieves polylogarithmic query time with near-linear storage for these problems, unlike the more tractable orthogonal case. Basic approaches to these queries rely on techniques such as dual transforms, which map points to hyperplanes (and vice versa) to reformulate halfspace queries as point location problems, and methods that recursively divide the point set into balanced regions for efficient subset processing. In two dimensions, queries—where a line intersects simplices—illustrate a practical variant, often reduced via cuttings or \epsilon-nets to approximate solutions. Seminal work by Matoušek introduced partition trees achieving O(n^{1-1/d}) query time with linear space, while Chazelle et al. developed multi-level structures for quasi-optimal performance at higher storage costs. These queries find applications in approximating linear programming problems, where halfspace intersections help identify feasible regions in convex polytopes, and in geometric optimizations like ray shooting or hidden surface removal in computer graphics.

Circular and Spherical Queries

Circular and spherical range queries involve identifying all points from a predefined set that lie within a specified ball in Euclidean space, such as a disk in two dimensions or a sphere in three dimensions. Formally, given a query center \mathbf{q} \in \mathbb{R}^d and radius r > 0, the query reports or counts points \mathbf{p} satisfying \|\mathbf{p} - \mathbf{q}\| \leq r, where \|\cdot\| denotes the Euclidean norm. These queries feature nonlinear boundaries defined by quadratic inequalities, distinguishing them from linear ranges like halfspaces. Unlike nearest neighbor searches, which seek the closest point without a fixed radius, circular and spherical queries focus on all points within a predetermined threshold, enabling applications in proximity detection. In two dimensions, the boundary is a governed by (x - q_x)^2 + (y - q_y)^2 \leq r^2; in higher dimensions, this generalizes to hyperspheres. Basic algorithms preprocess the point set to support efficient queries. A seminal approach is , which transforms the quadratic inequality into linear halfspace queries by the points on a surface in one higher dimension (e.g., lifting disks to halfspaces via z = x^2 + y^2), allowing reuse of halfspace structures with query time O(n^{1-1/(d+1)} + k) for reporting k points using linear space. Alternative preprocessing includes higher-order Voronoi diagrams, which partition based on distance orders to facilitate circular range reporting in O(\sqrt{n} + k) time for disks. Grid-based approximations discretize into uniform or adaptive cells, querying relevant cells for points near the sphere's boundary, though this introduces approximation errors and scales poorly beyond low dimensions. In high dimensions, these methods face significant challenges due to the curse of dimensionality, where query times degrade to near-linear O(n^{1-1/d}) even with linear space, and preprocessing space can balloon to O(n^d) for logarithmic query times, rendering exact solutions impractical for d > 10. A representative example is in wireless sensor networks, where circular queries identify all within communication radius r of a central to model coverage or , preprocessing networks of thousands of points for sublinear query responses.

Data Structures

Range Trees

Range trees are a class of multi-level balanced binary search trees designed primarily for efficient orthogonal range queries on static sets of points in multi-dimensional space. In the two-dimensional case, the structure consists of an outer balanced binary search tree (BST) organized by the x-coordinates of the points, where each node in this outer tree stores a balanced BST on the y-coordinates of the points in its subtree. This nested "tree-of-trees" organization allows decomposition of a rectangular query into a small number of canonical subtrees whose points lie entirely within the query range. For higher dimensions, the structure extends recursively, with each level handling one coordinate dimension, resulting in a d-level tree for d-dimensional points. The construction of a d-dimensional range tree begins by sorting the n points by their first coordinate and building a balanced BST on this order, which takes O(n log n) time. For each node in this tree, the points in its subtree are sorted by the second coordinate and another balanced BST is built, repeating this process for subsequent dimensions. Overall, the construction time is O(n \log^{d-1} n), and the is also O(n \log^{d-1} n), as each point appears in O(\log^{d-1} n) nodes across the levels. To enhance query efficiency, can be applied by augmenting the inner trees with pointers that allow traversing sorted sequences in O(1) time per step after an initial search, reducing redundant searches across associated structures. For a two-dimensional orthogonal range query defined by a [x_1, x_2] \times [y_1, y_2], the algorithm first traverses the outer x-tree to identify O(\log n) whose subtrees' x-ranges are completely contained within [x_1, x_2] and overlap the query in y. These partition the candidate points. For each such , the associated y-tree is queried to (or ) points with y-coordinates in [y_1, y_2]. Without , this involves O(\log n) time per y-tree search, yielding a total time of O(\log^2 n + k) where k is the number of points , or O(\log^2 n) for . With , the y-searches are optimized to O(1 + k / \log n) amortized per , improving the overall time to O(\log n + k). In d dimensions, without the time is O(\log^d n + k) and O(\log^d n); with , is O(\log^{d-1} n + k) and O(\log^{d-1} n). A compressed variant based on filtering search techniques achieves O(n \log n / \log \log n) space in two dimensions with O(\log n + k) reporting time and O(\log n) for counting, using advanced methods beyond simple sorted arrays. In higher dimensions, it yields O(n \log^{d-1} n / \log \log n) space with O(\log^{d-1} n + k) reporting time. A simpler approach replaces inner trees with sorted arrays for rank queries in O(\log n) time, but retains O(n \log n) space in 2D with O(\log^2 n + k) reporting time. Consider a simple example with a static set of five points in the : (1, 3), (2, 1), (3, 4), (4, 2), (5, 5), sorted by x-coordinate. The outer x-tree has leaves corresponding to these points in order. Each internal node stores a y-sorted list or of its subtree's points: for instance, the root (covering all points) has y-order (2,1), (1,3), (4,2), (3,4), (5,5). A query for the [2, 4] \times [2, 4] identifies canonical x-subtrees covering points with x in [2,4], then filters y in [2,4] to report (3,4) and (4,2). This demonstrates how the isolates relevant subsets efficiently for rectangular orthogonal queries.

k-d Trees

k-d trees, also known as k-dimensional trees, are binary space-partitioning data structures designed for efficient storage and retrieval of points in multidimensional space, particularly suited for orthogonal range searching. Introduced by Jon Louis Bentley in 1975, they extend the concept of binary search trees to higher dimensions by alternately splitting the space along each coordinate axis. Each node in the tree represents a point and a splitting perpendicular to one dimension, dividing the space into two half-spaces, with the left subtree containing points less than the splitting value and the right subtree containing those greater. The splitting dimension cycles through the k dimensions (e.g., x, y, z in ) at each level to ensure balanced partitioning across all coordinates. The construction of a balanced begins by selecting the point along the current splitting to create subtrees of roughly equal size, ensuring the tree height is O(log n) for n points. This -finding step, when implemented efficiently, yields a total construction time of O(n log n) and of O(n), as each point is stored exactly once and the is binary. The adaptive nature of the partitioning allows the to handle non-uniform data distributions effectively, though the balance depends on the input order. For range querying, the algorithm traverses the tree from the , visiting only subtrees that may intersect the query hyper-rectangle while those entirely outside it. At each node, it checks if the splitting intersects the query and recurses accordingly; if the node's point lies within the , it is reported. This process efficiently discards irrelevant regions, leading to a worst-case query time of O(n^{1-1/d} + k) for reporting k points in d dimensions, where the n^{1-1/d} term accounts for the number of nodes visited in the worst case. In two dimensions, this bound simplifies to O(\sqrt{n} + k): O(\sqrt{n} + k) This performance makes k-d trees practical for moderate dimensions, though efficiency degrades as d increases due to the curse of dimensionality. A representative application of k-d trees is in spatial indexing for 3D object retrieval, such as in computer graphics systems where they accelerate queries for objects within a bounding volume by partitioning the scene's point cloud or vertex data.

Segment and Fenwick Trees

Segment trees and Fenwick trees are fundamental one-dimensional data structures designed for efficient range queries and updates on , serving as key building blocks in range searching algorithms. These structures excel in handling aggregate operations like sums, minima, or counts over , with logarithmic time complexities that make them suitable for dynamic datasets. A is a full constructed over an of size n, where each represents an of the array and stores an aggregate value, such as the sum or minimum, for that interval. The tree is built by recursively dividing the array into halves until single elements are reached, resulting in approximately $4n nodes in the standard implementation, which yields an O(n) . Construction of the takes O(n) time, as each level of the tree is filled in constant time per . Fenwick trees, also known as binary indexed trees, provide a more compact alternative for computations using an array-based structure that implicitly represents a via bitwise operations. Introduced for maintaining cumulative tables, a also requires O(n) space and supports both updates and prefix queries in O(\log n) time by traversing the tree structure encoded in the array indices. Both structures enable efficient range queries through decomposition or differencing. For aggregates like sums or counts, a range query on interval [l, r] can be answered in O(\log n) time by combining O(\log n) nodes in a segment tree or by computing the difference of two prefix queries in a Fenwick tree. For reporting all elements in a range, the query decomposes the interval into disjoint canonical segments covered by O(\log n) tree nodes, allowing traversal to report the elements. The core operation in Fenwick trees for range sums relies on prefix sums, where the sum over [l, r] is computed as \textit{prefix}(r) - \textit{prefix}(l-1), and each \textit{prefix}(i) query runs in O(\log n) time by summing values along the least significant bit positions of i. \sum_{i=l}^{r} a_i = \textit{prefix}(r) - \textit{prefix}(l-1) In practical applications, such as , these structures facilitate one-dimensional range sums over stock price arrays to compute metrics like total returns over time periods, enabling rapid updates as new prices arrive. They are often layered as inner structures within higher-dimensional range trees for orthogonal queries.

Advanced Topics

Dynamic Range Searching

Dynamic range searching extends static range querying frameworks by supporting insertions and deletions of points while maintaining efficient query performance. This capability is essential for applications where data sets evolve over time, such as tracking moving objects or updating in . The primary challenge lies in balancing update and query times, as naive rebuilding of the entire structure after each modification would lead to prohibitive costs; instead, techniques like partial rebuilding introduce logarithmic factors that degrade performance but ensure practicality. A foundational approach involves augmenting range trees with dynamization methods, such as global rebuilding or deamortized local updates, originally developed by Overmars and van Leeuwen. In their framework for decomposable searching problems, including 2D orthogonal range queries, the structure uses a hierarchical decomposition into blocks of exponentially increasing sizes, allowing updates to propagate through affected levels with amortization. This yields O(n log n) space usage, O(log² n + k) query time, and amortized O(log² n) update time for reporting k points. Subsequent improvements by Mehlhorn and Näher incorporated dynamic fractional cascading to refine these bounds to O(n log n) space, O(log n log log n + k) query time, and O(log n log log n) update time, reducing the logarithmic overhead without increasing space. Partition trees provide an alternative for dynamic settings, particularly in higher dimensions, by maintaining a balanced of simplicial partitions that adapt to insertions and deletions through localized restructurings. Developed by Schipper and Overmars, these trees support orthogonal range queries with update times comparable to logarithmic factors while aiming for near-linear space in some variants, though they often trade off against the tighter bounds of dynamized range trees in low dimensions. In practice, such structures enable real-time updates in geographic information systems (GIS) for querying ranges of moving points, like vehicle positions, where frequent insertions reflect trajectory changes and queries retrieve nearby entities within bounding boxes.

Colored Range Searching

Colored range searching extends the standard searching problem by assigning each point in the geometric space a color or categorical label from a finite . The goal of a query is to identify and report the unique colors present among the points lying within a specified , or to compute the count of points for each color in that range, thereby providing aggregated information based on categories rather than individual points. To support these queries efficiently, data structures often augment traditional geometric structures like range trees with mechanisms to handle colors. For instance, a primary range tree organizes points by spatial coordinates, while secondary structures—such as balanced search trees or wavelet trees on the color attributes—enable fast aggregation or enumeration of distinct colors within canonical subtrees. Wavelet trees are particularly useful when colors are drawn from a large but bounded , allowing compressed representation and logarithmic-time operations for counting or selecting colors. Persistence techniques can further extend these structures to maintain multiple versions of the point set, supporting dynamic scenarios where points or colors are updated over time. In terms of performance, seminal work by Kaplan et al. achieves O(n \log n) space and O(\log n) query time for computing the full count vector (points per color) in 2D orthogonal ranges, assuming a polynomial number of colors. For reporting the distinct colors, structures with O(n \log^2 n) space support queries in O(\log^2 n + t) time, where t is the number of output colors, by traversing O(\log n) canonical nodes in the range tree and merging color information from associated secondary trees in O(\log n + t / \log n) amortized time per node using techniques like fractional cascading. In models prioritizing linear space, such as O(n) space structures based on partition trees, query time for reporting distinct colors degrades to O(\sqrt{n \log n} + t). These bounds hold under the pointer machine model for orthogonal ranges in 2D, with extensions to higher dimensions incurring polylogarithmic factors. A representative application involves querying the unique (colors) observed within a geographic (range) from a of animal sightings (points), enabling analysis without enumerating every individual occurrence.

Semigroup Range Searching

Semigroup range searching involves computing the operation over the values associated with points lying within a specified range, where the operation is associative but not necessarily commutative or invertible. A consists of a set equipped with an associative , such as for summing weights or maximum for finding the largest value. Each point in the is assigned a weight from the , and a query returns the aggregate result of applying the operation to all weights of points in the query range, without needing to report individual points. This model is particularly useful for aggregation tasks where inverse operations are unavailable, distinguishing it from more general algebraic structures like groups. In one dimension, segment trees provide an efficient for semigroup range searching. A segment tree is a balanced where each represents an interval of the sorted point coordinates and stores the semigroup aggregate of weights in that interval. Queries decompose the target range into O(log n) canonical segments, and the result is obtained by combining their precomputed aggregates in O(log n) time, using O(n) space. For higher dimensions, range trees extend this approach: a d-dimensional range tree is a tree of (d-1)-dimensional range trees, with each storing an associated for the lower-dimensional . Semigroup operations are supported by storing aggregates at each , enabling O(log^d n) query time and O(n log^{d-1} n) space in the static case. Priority search trees, which combine and properties, can handle certain two-dimensional orthogonal queries (e.g., three-sided ranges) for semigroup aggregates in O(log n) time with linear space. Fractional cascading optimizes searches in multidimensional trees by sharing search paths across associated structures, reducing redundant traversals. In two dimensions, this yields O(log^2 n) query time for orthogonal searching, such as computing the sum of weights, by linking the secondary trees in a primary to allow O(log n) collective searches instead of independent ones. Dynamic variants support insertions and deletions in O(log^d n) time while maintaining the query performance, achieved through balanced rebuilding or deamortized updates. Counting the number of points in a is a special case, equivalent to summing weights of 1 in the additive . A practical example is aggregating sales data, where points represent transactions with coordinates for time and , and weights are sales amounts; a query over a time-price range computes the total sales sum using the additive .

Applications

Geographic Information Systems

Range searching plays a crucial role in geographic information systems (GIS) for managing and querying vast spatial datasets, enabling efficient retrieval of points, lines, and polygons within specified regions. In GIS applications, orthogonal range queries are commonly used for bounding box searches, such as identifying all features within a rectangular area on a , while circular range queries support proximity searches to find points of interest (POIs) within a given from a . These query types facilitate point-of-interest searches, allowing users to discover nearby amenities like restaurants or services based on geometric constraints. A prominent example is in navigation and services like , where range searching powers queries for the nearest restaurants or attractions within a user-defined bounding box or proximity radius, delivering results in as users interact with the . For more complex scenarios, such as 3D modeling, range searching extends to halfspace queries to analyze visibility, elevation profiles, or intersections in volumetric , supporting applications in and environmental simulation. searching further enhances by accommodating updates to spatial , such as live traffic or sensor feeds, ensuring responsive visualizations in dynamic environments. Range searching in GIS often integrates with R-trees, a spatial index structure that organizes data hierarchically using minimum bounding rectangles (MBRs) to handle variable shapes and overlapping regions effectively. This integration is vital for scalability, allowing systems to process millions of points—such as in large-scale urban datasets—without exhaustive scans. The benefits are substantial: without spatial indexing, queries on massive datasets could take hours or even days on a single processor, but R-tree-based range searching reduces response times to seconds, enabling practical analysis of terabyte-scale geospatial information.

Database Systems

In database systems, range searching enables efficient multidimensional filtering and aggregation, forming a core component of query processing for structured data. Relational databases support one-dimensional range queries through SQL predicates like BETWEEN or >, as in SELECT * FROM customers WHERE age BETWEEN 20 AND 40 AND salary > 50000, which retrieves records meeting conjunctive criteria across attributes such as demographics and financial metrics. These queries leverage indexes to avoid full table scans, significantly improving performance on large datasets. Multidimensional extensions extend this capability to higher dimensions, using specialized indexes to handle queries involving multiple attributes simultaneously. For example, B-trees provide foundational support for sorted range scans in one dimension within relational systems, while structures like R-trees address spatial or feature-based multidimensional ranges by organizing data into bounding rectangles. In , the Generalized Search Tree (GiST) framework integrates such indexes, supporting operators for overlap (&&) and containment (@>) in range queries on types like boxes or timestamps, with dynamic updates handled via balanced tree rebalancing during insertions and deletions. Practical applications include customer relationship management (CRM) systems, where range queries perform segmentation by filtering customer records on attributes like age, income, and purchase history to identify target groups for marketing campaigns. In time-series analysis, semigroup range searching computes aggregates such as sums over temporal intervals, enabling efficient reporting of metrics like total sales within a date range. Colored range searching further enhances this by incorporating categorical filters, such as retrieving unique product categories within sales or demographic ranges. Dynamic variants ensure these structures adapt to updates in live databases without rebuilding entire indexes. The integration of range searching has evolved from the 1970s relational model, which relied on B-trees for basic ranges, to 1980s advancements like the for multidimensional spatial data. By the , implementations in commercial systems like demonstrated up to 11-fold performance gains for range queries via structures such as the X-tree. Modern extensions, including for since 2001, incorporate GiST-based R-trees to support NoSQL-like spatial queries while maintaining relational properties, facilitating multidimensional filtering in diverse workloads.

Other Applications

Beyond GIS and databases, range searching finds use in for efficient scene rendering and object culling, where queries identify visible elements within ranges or bounding volumes to optimize ray tracing and . In , it supports path planning by reporting obstacles within proximity ranges, enabling and avoidance in dynamic environments. These applications leverage data structures like k-d trees for low-dimensional queries in graphics and octrees for 3D spatial partitioning in robotic simulations.

References

  1. [1]
    [PDF] 40 RANGE SEARCHING - CSUN
    A central problem in computational geometry, range searching arises in many appli- cations, and a variety of geometric problems can be formulated as range- ...
  2. [2]
    [PDF] Geometric range searching* - Stanford Computer Graphics Laboratory
    In geometric range searching, algorithmic problems of the following type are considered: Given an n-point set P in the plane, build a data.
  3. [3]
    [PDF] Geometric Range Searching and Its Relatives
    The size of any range-searching data structure is at least linear, since it has to store each point (or its weight) at least once, and the query time in any ...
  4. [4]
    [PDF] Approximate Range Searching in Higher Dimension ∗ - cs.Princeton
    Abstract. Applying standard dimensionality reduction techniques, we show how to perform approximate range searching in higher dimension while avoiding the ...
  5. [5]
    [PDF] 36 RANGE SEARCHING - Duke Computer Science
    INTRODUCTION. Range searching is one of the central problems in computational geometry, because it arises in many applications and a variety of geometric ...Missing: seminal | Show results with:seminal
  6. [6]
    Data Structures for Range Searching | ACM Computing Surveys
    BENTLEY, J.L. "Decomposable searching problems," Inf. Process. Lett. 8, 5 (June 1979), 133--136. Google Scholar. [7]. BENTLEY, J. L. "Multidimensional binary ...
  7. [7]
    [PDF] Lecture 8: Orthogonal Range Searching
    First we organize the data in a BST by x value. ○ At every node in the tree, we store a pointer to a BST with the same data, but organized by y value.Missing: properties | Show results with:properties
  8. [8]
    [PDF] 1 The range query problem - Stanford Computer Graphics Laboratory
    May 19, 1994 · Orthogonal range query problem: the range is a box whose sides are aligned with the axes. This question has applications in several ...
  9. [9]
    [PDF] Orthogonal Range Searches
    1D Base Case: Sorted Arrays. (1978). O(logd n + k). O(n logd – 1 n). Page 85. More to Explore. ○ Geometric cascading and downpointers generalize to fractional.
  10. [10]
    [PDF] Simplex Range Searching and Its Variants: A Review
    Feb 28, 2016 · A central problem in computational geometry, range searching arises in many applications, and numerous geometric problems can be formulated in ...
  11. [11]
    [PDF] Quasi-Optimal Upper Bounds for Simplex Range Searching and ...
    Abstract. This paper presents quasi-optimal upper bounds for simplex range searching. The problem is to preprocess a set P of n points in R" so ...Missing: seminal | Show results with:seminal
  12. [12]
    [PDF] Circumcircular Range Searching in Higher Order Delaunay ...
    The most of time optimal solutions of the 2- dimensional circular range searching problem use higher order Voronoi diagrams (HOVD) [7]. Bentley. [2] presented a ...
  13. [13]
    [PDF] Coherent Spherical Range-Search for Dynamic Points on GPUs
    Jan 9, 2017 · Specifically, every grid node is used as a query point to conduct SRS with radius r = 4w. There are. 2573 = 16, 974, 593 query points in total.
  14. [14]
    Efficient worst-case data structures for range searching
    1 de fev. de 1980 · In this paper we investigate the worst-case complexity of range searching: preprocess N points in k-space such that range queries can be answered quickly.
  15. [15]
    [PDF] Fractional Cascading: I. A Data Structuring Technique - cs.Princeton
    The strategy adopted by fractional cascading is to do only one binary search at the beginning, and then, as each vertex v of is specified, locate x in C with ...
  16. [16]
    [PDF] Filtering Search: A New Approach to Query-Answering - cs.Princeton
    FILTERING SEARCH: A NEW APPROACH TO QUERY-ANSWERING*. BERNARD CHAZELLE". Abstract. We introduce a newtechnique for solving problems of the following form ...
  17. [17]
    [PDF] Range Search (chapter 5) - Purdue Computer Science
    ▷ kd-trees generalize to 3 dimensions. ▷ The split lines become planes. ▷ The construction cycles between x, y, and z splitting planes. ▷ Likewise in ...<|control11|><|separator|>
  18. [18]
    Data Structures for Range Searching - ACM Digital Library
    In this section we investigate the range tree, a structure introduced by. Bentley [BENT79a] that is also similar to the former structures. It achieves the best.
  19. [19]
    Segment Tree - Algorithms for Competitive Programming
    Dec 20, 2023 · A Segment Tree is a data structure that stores information about array intervals as a tree. This allows answering range queries over an array efficiently.Simplest form of a Segment Tree · Structure of the Segment TreeMissing: original paper
  20. [20]
    Introduction to Segment Trees - Data Structure and Algorithm Tutorials
    Aug 31, 2025 · As the total number of nodes is about twice the number of leaf nodes, the total space complexity of the segment tree is O(4n).
  21. [21]
    [PDF] A New Data Structure for Cumulative Frequency Tables
    SUMMARY. A new method (the 'binary indexed tree') is presented for maintaining the cumulative frequencies which are needed to support dynamic arithmetic ...
  22. [22]
    A new data structure for cumulative frequency tables
    A New Data Structure for Cumulative. Frequency Tables. PETER M. FENWICK. Department of Computer Science, University of Auckland, Private Bag 9201 9, Auckland,.
  23. [23]
    Fenwick Tree - Algorithms for Competitive Programming
    Apr 15, 2025 · The Fenwick tree is also called a Binary Indexed Tree (BIT). It was first described in a paper titled "A new data structure for cumulative ...Missing: original | Show results with:original
  24. [24]
    Implementing Fenwick Trees for Efficient Range Queries
    In this comprehensive guide, we'll dive deep into the world of Fenwick Trees, exploring their implementation, applications, and advantages over other data ...The Intuition Behind Fenwick... · Implementing A Fenwick Tree... · Using The Fenwick Tree
  25. [25]
    Two general methods for dynamizing decomposable searching ...
    Overmars, M.H., van Leeuwen, J. Two general methods for dynamizing decomposable searching problems. Computing 26, 155–166 (1981). https://doi.org/10.1007 ...
  26. [26]
    Dynamic fractional cascading | Algorithmica
    The problem of searching for a key in many ordered lists arises frequently in computational geometry. Chazelle and Guibas recently introduced fractional ca.
  27. [27]
    Indexing Moving Points - ScienceDirect.com
    This paper focuses on developing efficient indexing schemes for storing a set of points, each moving in the xy-plane, so that range queries over their locations
  28. [28]
    [PDF] 41 RANGE SEARCHING - Duke Computer Science
    In contrast, a 3D orthogonal range query can be answered in. O(log log n + k) time using O(n log1+ n) space. Larsen [88] proved that a dynamic data structure ...<|control11|><|separator|>
  29. [29]
    [0903.4726] Range Quantile Queries: Another Virtue of Wavelet Trees
    Mar 27, 2009 · A range quantile query takes a rank and the endpoints of a sublist and returns the number with that rank in that sublist. For example, if the ...Missing: searching | Show results with:searching
  30. [30]
    Efficient Colored Orthogonal Range Counting - SIAM.org
    Efficient Colored Orthogonal Range Counting. Authors: Haim Kaplan, Natan Rubin, Micha Sharir, and Elad VerbinAuthors Info & Affiliations. https://doi.org ...
  31. [31]
    [PDF] Better Data Structures for Colored Orthogonal Range Reporting
    In this paper, we obtain the current best results for perhaps the most basic, and most often studied, version of the geometric problem: colored orthogonal range ...
  32. [32]
    [2003.11604] Further Results on Colored Range Searching - arXiv
    Mar 25, 2020 · Abstract:We present a number of new results about range searching for colored (or "categorical") data: 1. For a set of n colored points in ...Missing: Eppstein | Show results with:Eppstein
  33. [33]
    A dive into spatial search algorithms | by Vladimir Agafonkin
    Apr 27, 2017 · Spatial data has two fundamental query types: nearest neighbors and range queries. Both serve as a building block for many geometric and GIS ...
  34. [34]
    Spatial Data Analytics : The What, Why, and How?
    Apr 4, 2023 · Google Maps is an application that uses ... Supports various spatial queries, such as range queries, KNN queries, and spatial joins.
  35. [35]
    Efficient 3D Spatial Queries for Complex Objects - ACM Digital Library
    Feb 12, 2022 · 3D spatial data has been used in numerous industrial applications, such as CAD, urban planning, terrain modeling, mineral exploration, ...
  36. [36]
    The SQLite R*Tree Module
    May 31, 2025 · An R-Tree is a special index that is designed for doing range queries. R-Trees are most commonly used in geospatial systems where each entry is a rectangle.
  37. [37]
  38. [38]
    [PDF] Towards Building a High Performance Spatial Query System for ...
    expensive and may take hours or days to compute even for a sin- ... is very fast whereas most of the query time ... seconds on a single process PostGIS for a single ...<|control11|><|separator|>
  39. [39]
    [PDF] Multidimensional Index Structures in Relational Databases
    Multidimensional index structures are used for efficient query processing in high-dimensional data, especially for data mining algorithms. Relational databases ...
  40. [40]
    Documentation: 18: 65.2. GiST Indexes - PostgreSQL
    GiST stands for Generalized Search Tree. It is a balanced, tree-structured access method, that acts as a base template in which to implement arbitrary indexing ...
  41. [41]
    [PDF] Geometric Range Searching and Its Relatives - Jeff Erickson
    For example, the points of may correspond to employees of a company, each co- ordinate corresponding to a key such as age, salary, or experience. Queries such ...<|control11|><|separator|>
  42. [42]
    15. Spatial Indexing — Introduction to PostGIS
    ### Summary of Spatial Indexing in PostGIS