rtree-query — bulk R-tree search from CSV rectangle data


rtree-query [-h ] [-o file] -t file [-v ] [-V ] [file]


The rtree-query program read an R-tree in rtree-json(5) or rtree-bsrt(5) formats (specified by the mandatory --tree switch), and CSV rectangle data from file or stdin (as described in rtree-csv(5) ) writing pairs of intersecting-rectangle ids (query id, matching id) as lines of CSV to stdout or file.

Note that the output CSV uses "CRLF" line-endings (as used by MS-DOS) since this is explicitly mandated by RFC-4180.

The program is useful for bulk spatial queries since the time taken to load the R-tree is amortised over multiple queries. It is also useful in development as a benchmarking tool.


-h, --help

List the program options.

-o, --output file

Write the output to file, rather than stdout. The file is in the CSV format and consists of rectangle ids: first the query id (as in the first column of the input), then the matching rectangle id, as found in the R-tree.

-t, --tree file

Read the R-tree to search from the specified file. This can be in the rtree-json(5) or rtree-bsrt(5) format, as produced by rtree-build(1) .

-v, --verbose

Verbose operation.

-V, --version

Version information.


J. J. Green, .