spatialBoundingBoxFilter method
The rows of table whose geomColumn's bounding box overlaps the
rectangle ([minX], [minY])-([maxX], [maxY]).
A pure R*Tree query — the fastest and coarsest of the spatial filters, since it only tests bounding boxes, not exact geometry.
Implementation
Future<List<Map<String, Object?>>> spatialBoundingBoxFilter(
String table,
String geomColumn,
double minX,
double minY,
double maxX,
double maxY,
) => rawQuery(
'SELECT t.* FROM $table AS t '
'WHERE t.ROWID IN ('
' SELECT ROWID FROM ${_rtreeName(table, geomColumn)}'
' WHERE xmin <= ? AND xmax >= ? AND ymin <= ? AND ymax >= ?'
')',
[maxX, minX, maxY, minY],
);