MobilityDB 1.3
Loading...
Searching...
No Matches

◆ rtree_search()

int rtree_search ( const RTree rtree,
RTreeSearchOp  op,
const void *  query,
MeosArray result 
)

Search an RTree with a bounding box, collecting matching IDs into a MeosArray.

The result array is reset before the search. After the call, use the returned count and meos_array_get to read the matching IDs. The same array can be reused across multiple searches without reallocating.

Parameters
[in]rtreeThe RTree to query
[in]opThe search operation: RTREE_OVERLAPS finds boxes that overlap the query, RTREE_CONTAINS finds boxes that contain the query, RTREE_CONTAINED_BY finds boxes contained by the query
[in]queryThe bounding box that serves as query
[out]resultMeosArray of int to collect matching IDs (created by the caller with meos_array_create(sizeof(int)))
Returns
Number of matching IDs